11 ms·
> Ah, a grammar pedant. Haven't met one in a while. "That is now is 7 PM" "and want it to run tomorrow" "Like if simply print" none of these make sense > T
by 38 3y ago
> Ah, a grammar pedant. Haven't met one in a while.
"That is now is 7 PM"
"and want it to run tomorrow"
"Like if simply print"
none of these make sense
> Try again setting your timezone to let's say NY and date at 2023-11-04.
not sure what point youre trying to make, but youre failing:
package main
import (
"fmt"
"time"
)
func main() {
t1 := time.Date(2023,11,4,7+12,0,0,0,time.FixedZone("EST", -5*3600))
t2 := t1.Add(12 * time.Hour)
fmt.Println(t1) // 2023-11-04 19:00:00 -0500 EST
fmt.Println(t2) // 2023-11-05 07:00:00 -0500 EST
}
- forgotpwd16 3y ago>not sure what point youre trying to make, but youre failing No wonder since you failed to correctly specify NY timezone in first place. Here's a trivia, it wasn't UTC-5 on that date.
- 38 3y agohttps://wikipedia.org/wiki/Moving_the_goalposts https://wikipedia.org/wiki/Moving_the_goalposts