Raised This Month: $51 Target: $400
 12% 

get_systime() (timestamp) -> php problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
killergirl
Senior Member
Join Date: Jul 2010
Old 06-12-2012 , 18:03   get_systime() (timestamp) -> php problem
Reply With Quote #1

Edit: now it's working, the problem was caused by apache server, I resolved it editing the php.ini. Anyway, sorry for this topic, get_systime() is working fine !

Hi,

I'm having problem with timestamp. I'm storing dates (timestamp and other infos) into a database, but when I'm converting them into normal display date (php function), the date does not match !

Ex, the output from server (via amxx): get_systime() -> 1339537875

Converting it into date (via php): date('d-m-Y / H:m:s', 1339537875);
I don't know why It's converted with 2 hours lost. It should be 03:00, but it's 01:00.

I also thought that I'm not converting by the normal US date (month / date / year) but is the same problem. But anyway, get_systime() is getting the timestamp from the same clock, right?

date('m-d-Y / H:m:s', 1339537875)

Thank you !

Last edited by killergirl; 06-12-2012 at 18:11.
killergirl is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 06-12-2012 , 23:18   Re: get_systime() (timestamp) -> php problem
Reply With Quote #2

You also may use unix_timestamp( now( ) ) instead of using get_systime.
I mean you could get time in seconds elapsed since 1970 without doing any string, using %d with formatex.
__________________

Last edited by claudiuhks; 06-12-2012 at 23:19.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Reply



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 On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode