This topic is locked
[SOLVED]

 Display local time in listpage

1/22/2014 4:07:01 AM
PHPRunner General questions
S
snuffi01 author

Hi,
I have an listpage where different sites around the world is displayed.

Example: Site Gothenburg, Lokal Time Offset=+1 ......


In this table (site) i have an fileld called "timezone" where i enter offset from GMT example Gothenburg =+1
In listpage i would like to display lokal time, example GMT + "timezone".

How can this be accomplished?
Even more great function would to display sites in an Goggle map with timezone overlay <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=21890&image=2&table=forumtopics' class='bbc_emoticon' alt=':)' />
Using Phprunner 7.0 Build 19901
/ Kristian

Sergey Kornilov admin 1/22/2014

Assuming that field name is timezone you can modify SQL query as follows:

select ...,

DATE_ADD(NOW(), INTERVAL `timezone` HOUR) as CurrentTime

from ...