Closed keithamus closed 12 years ago
Hi,
There is another issues related that is bothering me lately.
Summer time. Spain is GMT+1, but in summer is like GMT+2
So now I have some dates with the 25 hours, and the countdowns ends because the day is not updated properly...
I prefer the second method. So i will try it
Having explored each of these in depth, here are the disadvantages for each (respectively). I still think style 3 is the one to go for but it comes a pretty big price.
Timezone support does not work very well, as it spills over hours, days, etc.
For example, if you are at the end of the day (say, the 23rd hour) in UTC, and you set the timezone to +0400, then getHours() will return 26. Similarly getDate() will return the wrong date (as the timezone is now the next day).
This bubbles up to Days, Weeks, Months, Years. Each one can hit an edge where the timezone should rollover the unit (e.g days) but doesn't.
Proposed Solutions:
_date
object only using UTC methods (ignoring_date
's internal tz data) and including Tempus tz data, and for Tempus' UTC methods 0 out the timezone, get the date info and put the tz back.My money is on style 3