Jump to content

Set Default DATE.


Andy11548

Recommended Posts

How do I set the date format so that it's always going by the UTC date?

 

I've used:

date_default_timezone_set('UTC');

 

but, when I change my date on my computer, the date changes on the website.

 

This is really confusing me, googled different ways for like 10/20 minutes and can't find anything.

 

If anyone can help it'd be great,

 

Thanks,

Andy.

Link to comment
Share on other sites

well, i'm really not sure since I haven't used localhost to test a site in a while.

Your computer acts as the server, so perhaps it's just grabbing the time from it.

I am sure someone else will chime in with a solution.

But really, if this is localhost, it shouldn't be a huge deal. This problem will most likely not occur on a live server.

Link to comment
Share on other sites

Alright, thanks for the help anyways.

 

The Time is working, if I change the time on my computer, it still shows the time as GMT (Europe/London), however, if I change the date it just echos the date set to my Computer, not the GMT date.

 

If that gives you any more information, great.

 

If not, thanks for the help anyways.

Link to comment
Share on other sites

I'm asking one question. The timezone sets the time to GMT, but doesn't affect the date, even if I change it through my PC.

 

I do believe that there is a way that you can subtract a certain number of days that may be useful if your computer was to stay at the same time consistently. If the date was changed again, you may need to modify the script

Link to comment
Share on other sites

I'm asking one question. The timezone sets the time to GMT, but doesn't affect the date, even if I change it through my PC.

 

I do believe that there is a way that you can subtract a certain number of days that may be useful if your computer was to stay at the same time consistently. If the date was changed again, you may need to modify the script

 

No, I want it so that it goes by GMT all the time, no matter what I do to the date on my computer. This website has it done, I need to know how to do it.

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.