It is currently Fri May 18, 2012 3:15 am

All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: time
PostPosted: Thu Jan 28, 1999 1:45 am 
How can I get the date and time for my local time zone instead of the date of the server (which is GMT)?


Top
  
 
 Post subject: RE: time
PostPosted: Thu Jan 28, 1999 12:25 pm 
I think i didnt understand your question but here goes anyway :)

If you have the GMT time of the server, Why not simply take the GMT time and add or substruct the GMT Delta of your location?

For example, Israel is GMT + 0200. I can know the time in israel even if my server is in the USA. I simply take the GMT time from the server, add 2 and have the time in Israel.

Was that close to what you asked?

berber


Top
  
 
 Post subject: RE: time
PostPosted: Thu Jan 28, 1999 9:52 pm 
Right that makes sense but will this work when GMT is on the next day? So if it is Thursday locally and it is already Friday GMT, will subtracting the difference in hours also set the day back? Perhaps you could show me exactly what your PHP looks like. I'm fairly new at this. Thanks!


Top
  
 
 Post subject: RE: time
PostPosted: Fri Jan 29, 1999 10:02 pm 
GMT relates to time, not date. If you wish to get the full date and time you can simply check the timestamp diffrance between your computer and the server, take the timestamp from the server, deduct the diffrence and translate the timestamp back into the date and time of where you are now.

You can find a function that translates the timestamp to date at : http://webdev.berber.co.il/get_example.php3?count=26

basicaly the timestamp is a number which represents the number of secconds since 1/1/1970 00:00:00.

berber


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron