View Single Post
glhf3000
Member
Join Date: Aug 2010
Location: middle-universe
Old 02-08-2024 , 05:19   Re: [ANY] Timezone API
Reply With Quote #10

for latest https://timezonedb.com/files/timezonedb.sql.zip

PHP Code:
SELECT (strftime('%%s',DATETIME('now''utc')) + `gmt_offset`), `dst`, `gmt_offset` \
        
FROM `time_zone` \
        
WHERE `time_start` <= strftime('%%s',DATETIME('now''utc')) AND `zone_name` = '%s' \
        
ORDER BY `time_startDESC LIMIT 1
->

PHP Code:
SELECT (strftime('%%s',DATETIME('now''utc')) + `gmt_offset`), `dst`, `gmt_offset` \
        
FROM `timezone` \
        
JOIN `zoneON `timezone`.`zone_id`=`zone`.`zone_id`\
        
WHERE `time_start` <= strftime('%%s',DATETIME('now''utc')) AND `zone_name` = '%s' \
        
ORDER BY `time_startDESC LIMIT 1

Last edited by glhf3000; 02-08-2024 at 05:20.
glhf3000 is offline