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,

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.