Jump to content

Mismatch between server time and PHP time


abdfahim

Recommended Posts

Hi,

 

The hosting provider for my domain confirm me that the server time is in EST (UTC-5). They also sent me a grab supporting that

server time is now:
----------------------
Sun Nov 7 02:20:01 EST 2010
-------------------

 

But when I use the following code, the output I get is has 1 hr difference (UTC-6)

echo date("d M, Y h:i:s A",time());

 

Output==> 07 Nov, 2010 01:20:01 AM

 

But it suppose to give the same time as the server, ryt? Can anybody please explain?

 

Thanks,

Hello, abdbuet.

 

Before you do work with date and time - which is in fact a confusing thing - you should call this thing likely:

@setlocale(LC_ALL,'de_DE@euro','de_DE','deu_deu');

 

ps: And read up all available methods on time-editing! It will be helpful as it stands in my rememberence.

 

Regards,

MPeter

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.