Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Odd date behaviour under 64-bit linux...

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
billybofh
Smarty n00b


Joined: 01 Sep 2004
Posts: 4

PostPosted: Tue Jan 18, 2005 8:32 pm    Post subject: Odd date behaviour under 64-bit linux... Reply with quote

I've recently treated myself to a nice amd64 machine. I've compiled apache 1.x + php 5.x and all works well. How-ever, I'm getting really odd behaviour with the date_format modifier.
For instance doing a $smarty.now|date_format:"%c" give (today is january 18th 2005 for anyone viewing this in a few millenia!):

Wed Mar 23 00:00:00 110608

If I do a plain php date("c") or strftime("%c") all is well though. Anyone else seen this?
Back to top
View user's profile Send private message
billybofh
Smarty n00b


Joined: 01 Sep 2004
Posts: 4

PostPosted: Tue Jan 18, 2005 8:43 pm    Post subject: Reply with quote

Just to add some more info - the date_format will also fail on other date format strings.

It also changes the date every time you reload the page, which makes me think there's definetely some odd 32/64-bits being mangled somewhere... :Smile
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Jan 19, 2005 9:10 am    Post subject: Reply with quote

Unfortunately I don't have access to an amd64 machine to test+reproduce that.
But if you say date() and strftime() work fine, then I suspect strtotime() [which is used by smarty_make_timestamp()] to be the source of the problem.

[edit: this is already filed and veryfied on bugs.php.net: http://bugs.php.net/bug.php?id=30215 Smile ]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
billybofh
Smarty n00b


Joined: 01 Sep 2004
Posts: 4

PostPosted: Wed Jan 19, 2005 9:26 am    Post subject: Reply with quote

Ahhh.... thanks for that. I'd had a quick look at the PHP bugs and missed that.

Well, hopefully anyone else with the problem will find this Smile Thanks again Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP