Feature request: Daylight Savings Time auto-detection
-
I’m honestly surprised you don’t have this built into your plugin. Now that we’re officially ON in Daylight Savings Time, I’m having to scramble to adjust your plugin’s timezones on 60+ websites. It would be awesome (especially in the FREE version) if you were to implement auto detection of whether a site should be in DST or not. Toggle could be:
detectdst=’on’ (options are on/off, default to on)
I updated one of my own plugins yesterday to do just that. This is the code I used for this. As you can see, it also utilizes the tz function, so you could incorporate it pretty easily into your pluginasdf
/***
*Making the plugin support timezones and DST much better and automatically, if desired.
*/
function getLDotWTime($tz = 'America/New_York', $DST = 'on') {
$date = new DateTime('now', new DateTimeZone($tz));
if ($DST == 'on' && $date->format('I') == 1) {
$date->modify('+1 hour');
}
return $date->format('Y-m-d');
}
- You must be logged in to reply to this topic.