[PHP] Timezones and Daylight Savings Time

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default RE: [PHP] Timezones and Daylight Savings Time

    What if you set the server to use UTC and then used the clients local
    system setting to offset it for each client?

    So the server would have it's time at UTC and a client in the Eastern US
    would be at -4. You could then detect the web client timezone setting
    and adjust as needed?

    This is just a logic suggestion, I have no idea if it's possible with
    code but I would imagin it would be..

    Jeff

    > -----Original Message-----
    > From: J J [mailto:squid_66@yahoo.com]
    > Sent: Thursday, September 25, 2003 12:56 PM
    > To: [email]php-general@lists.php.net[/email]
    > Subject: [PHP] Timezones and Daylight Savings Time
    >
    >
    > Got a client site in Thailand that is about 13 hours
    > different from the Web Server time so with any
    > date/time stamping I need to add the 13 hours.
    > However, when it comes time for DST, I'd hate to have
    > to code for that or remember to manually change the
    > time stamping.
    >
    > Is there some kind of automated function that
    > determines the time zone of one location to another
    > and stamps the correct time -- with or without DST?
    >
    >
    > I guess otherwise you'd have to do something like:
    > if > Oct 31st and < April XX { time+12 } else {
    > time+13
    >
    > Obviously not the correct code but that's the idea.
    > Am I off base here? Is there a simpler method or
    > something I'm not thinking of?
    >
    > If the server was dedicated I would just fix the
    > server time to be Thailand time, but it's a shared
    > server and I can't do that.
    >
    > Thanks in advance!
    >
    >
    > __________________________________
    > Do you Yahoo!?
    > The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com

    --
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    Jeff McKeon Guest

  2. Similar Questions and Discussions

    1. Daylight Savings Time
      Using the Date object, I can get the timezone (eg: GMT-4 is current for EDT, EST would return GMT-5). WHat I need help with is determining, from a...
    2. Daylight Savings Time fix and CFDOCUMENT
      After our webmaster installed the JVM update (1.4.2_13) to correct the DST issue, I discovered that CFDOCUMENT doesn't seem to function. Has anyone...
    3. ColdFusion 5 and Daylight Savings Time
      Is Cold Fusion 5 affected by the change in Daylight Savings Time that's coming up? If so, is there a resolution?
    4. CF MX and Daylight Savings Time Change
      Next year 2007, the Daylight Saving day (chaning the clocks for spring and fall) will be changing. The Spring date will be a month earlier and the...
    5. accounting for daylight savings time
      Hi If you need to account for daylight savings, you could use the following SQL query to detect the same select SYSDATE x, 0 r1 from dual where...
  3. #2

    Default RE: [PHP] Timezones and Daylight Savings Time

    They want everything set to their time, so it would
    probably be easier just to determine the server time
    and add as necessary. I think...


    --- Jeff McKeon <jmckeon@telaurus.com> wrote:
    > What if you set the server to use UTC and then used
    > the clients local
    > system setting to offset it for each client?
    >
    > So the server would have it's time at UTC and a
    > client in the Eastern US
    > would be at -4. You could then detect the web
    > client timezone setting
    > and adjust as needed?
    >
    > This is just a logic suggestion, I have no idea if
    > it's possible with
    > code but I would imagin it would be..
    >
    > Jeff
    >
    >
    __________________________________
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    [url]http://shopping.yahoo.com[/url]
    J J Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139