Time convertions with daylight saving
20 April 2010
I’ve found how to convert time from UTC to local time with daylight
saving correction:
- Use mktime() to create time from string(or some thing else)
- get time from gmtime() and localtime()
- calculate difference between time to get timezone offset (or
use_get_timezone)
- use tm::tm_isdst to determine apply or not daylight saving
- use _get_daylight() to get value in hours of daylight correction.
Share on Facebook
Share on Google Plus
Share on LinkeIn