Results 1 to 5 of 5
-
05-21-2003, 04:09 AM #1Junior Guru Wannabe
- Join Date
- Jan 2003
- Posts
- 36
Europe time on US server (php/mysql) ?
I have reseller account on US server. But I live in Europe and all my customers are from Europe. And I have one problem - time on this server. In Europe is +6 H than in US. date() in php and for example now() in mysql will get US time. Is there any possibility in other way define time for some account on this server that when i use time functions it will get correct time (Europe). Maybe throught .htaccess or apache config ? I know that i can add 6h in all my scripts but i want that my custommers don't need to do this, or don't need modify other scripts (ex. phpBB). Thanks for any help.
-
05-21-2003, 04:13 AM #2Web Hosting Guru
- Join Date
- Oct 2000
- Posts
- 258
you will need to set the clock to GMT and revcompile apache
-
05-21-2003, 04:30 AM #3Junior Guru Wannabe
- Join Date
- Jan 2003
- Posts
- 36
You don't understand me. I have account on US server, I'm not owner. Then i can't recompile apache and can't change any system config or system time for all server. I would do this only for separate account.
-
05-21-2003, 07:21 AM #4Retired Moderator
- Join Date
- Jan 2003
- Posts
- 9,049
The date or now functions in scripts uses the server time. Since you don't have control over the server, there's nothing you can do on that end.
What you have to do is to program your scripts such that you adjust the time. Simple enough. e.g. adding 6 hours to the time you get from now function.••• Like us on Facebook to qualify for discounts! •••
••• http://www.sprintserve.net •••
••• Offering: | Internap FCP Bandwidth! | Rebootless Kernel Updates! | Magento Optimized Hosting | Wordpress Hosting | •••
••• Services: | Managed Multiple Cores 64bit Servers | Server Management | •••
-
05-21-2003, 07:31 AM #5Web Hosting Master
- Join Date
- Aug 2002
- Location
- UK
- Posts
- 852
MySQL has a very conveniant dateadd function, can't remember exact syntax but it's something like dateadd('variable',6 hour)