|
Posted by Chris Hope on 07/11/05 13:30
Jerry Stuckle wrote:
> Chris Hope wrote:
>> Ben Allen wrote:
>>
>>>WebM¤nkey wrote:
>>>
>>>>Chris Hope wrote:
>>>>
>>>>>WebM¤nkey wrote:
>>>>>
>>>>>>Hi folks
>>>>>>Just found that the mktime function returns a negative value when
>>>>>>the date is 26 march 2006 with 0 hours, 0 seconds and 0 minutes.
>>>>>>Is this a documented problem ? Any suggestions ?
>>>>>
>>>>>Works for me. Show us your code.
>>>>
>>>>print mktime(0,0,0,3,26,2006);
>>>>prints -3662
>>>
>>>That code prints me:
>>>1143349200
>>
>> I get 1143288000
>>
>> 1143349200 gives me "2006-03-26 17:00:00" when I do:
>> print date('Y-m-d H:i:s', 1143349200);
>>
>>>I'm not sure what you want to do but if you are trying to display the
>>>date you need code like this:
>>>
>>>mktime(0,0,0,3,26,2006);
>>>print date("d-m-Y");
>
> Sounds like a time zone difference to me.
Must be. Something to bear in mind when using the mktime() function and
running an app across different machines.
--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
[Back to original message]
|