Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Posts
    36

    Question 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.

  2. #2
    you will need to set the clock to GMT and revcompile apache

  3. #3
    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.

  4. #4
    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 | •••

  5. #5
    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •