Jump to content

cows

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Posts posted by cows

  1. [quote author=xsist10 link=topic=111620.msg452463#msg452463 date=1160988210]
    This may work....
    [code]
    <?php
    echo date('D, j M Y h:i:s',  1159660803 - date('Z'));

    // or

    date_default_timezone_set('UTC');
    echo date('D, j M Y h:i:s',  1159660803)

    ?>
    [/code]
    [/quote]

    The first solution worked perfectly.  Thank you very much.  I didn't want to use the date_default_timezone_set() because the server doesn't support that yet.

    Thank you for all the replies, they are much appreciated.
  2. Thank you.

    I never realised the date function formatted the dates using the server's time zone settings and daylight saving settings.  I thought it would format the date as-is, UCT.

    Is there anyway I can get the formatted date in UCT with that date function or another function?
  3. Hi,

    I am pretty new to php and I have a problem I can't quite figure out.  I am not sure if I am misunderstanding the date() function or there is something else I am missing. 

    I have this time stamp: [b]1159660803[/b]

    In the time stamp converter it says [b]Sun, 1 Oct 2006 00:00:03 UTC[/b]

    When i try get that from the date() function using

    [code]date('l dS \of F Y h:i:s A',  1159660803);[/code]

    I get a date/time and hour out ([b]Sunday 01st of October 2006 01:00:03 AM[/b])

    I need to get the time in the time stamp, is there something I am doing wrong or not quite understanding?  The server is in the UK if that makes any difference.

    Any help would be appreciated, I have spent all night trying to figure out what I am doing wrong. :(
×
×
  • 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.