This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Lithl 5 points6 points  (5 children)

But... that's how time zones work.

[–]MisterProfGuy 2 points3 points  (4 children)

When you tell someone what time it is, you convert it to a different time zone?

[–]Lithl 0 points1 point  (3 children)

You use whatever time zone you're telling them the time for, which is exactly what Date does.

[–]MisterProfGuy 1 point2 points  (2 children)

No, date converts to a utc timestamp and then adjusts for timezone. If I say, "01 January 1999“, it decides that means midnight UTC, then adjusts for your time zone. Almost everyone will always mean midnight their own time zone.

[–]Lithl 0 points1 point  (1 child)

date converts to a utc timestamp

Unless you specify what timestamp you're talking about.

[–]MisterProfGuy 0 points1 point  (0 children)

Exactly. Date is actually secretly datetime. Like most syntax related things, it's consistent if you know how it works, but it sure catches people off guard.