Bluehost.com Web Hosting $6.95

Chris->[PHP] Re: Weird results for 2 lines of damn code

This is a discussion on Chris->[PHP] Re: Weird results for 2 lines of damn code within the PHP General forums, part of the PHP Programming Forums category; Hey Chris, Thanks for replying. Its certainly weird how its working with you, it should have worked with me too ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-17-2003
Ryan A
 
Posts: n/a
Default Chris->[PHP] Re: Weird results for 2 lines of damn code

Hey Chris,
Thanks for replying.

Its certainly weird how its working with you, it should have worked with me
too as I did that example straight out of the manual (slightly modified to
suit my needs)

Anyway, here is a solution sent to me by Jon from the list which works
great, might work with your server too:

Replace %G _with_ %Y



Cheers,
-Ryan




Hey Ryan,
Just did a straight copy and paste of your code into a php page on my
server.

CODE:
$ryan=strtotime ("now"); echo $ryan."<br>";
echo strftime("%G-%m-%a %H:%M:%S", $ryan)."<br>";

RESULT:
1066353488
2003-10-Thu 21:18:08

Seems to work fine for me...This seems to be a deeper problem than your
code itself, probably having something to do with your computer or its
libraries. Reading through www.php.net/strftime there were a few
warnings about systems not conforming to ISO standards and doing quirky
things.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 04:13 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0