arianhojat Posted November 10, 2006 Share Posted November 10, 2006 SELECTUNIX_TIMESTAMP('1970-01-01 00:00:00'),FROM_UNIXTIME(18000),FROM_UNIXTIME(0)results in 18000, '1970-01-01 00:00:00', '1969-12-31 19:00:00'does anyone else get unexpected results here?should start counting from Jan. 1st, 1970 as i have read in manual but it seems like it starts counting from 7pm 1969using mysql 4.1 Link to comment https://forums.phpfreaks.com/topic/26855-mysql-from_unixtime-starting-from-1969-12-31-190000/ Share on other sites More sharing options...
fenway Posted November 10, 2006 Share Posted November 10, 2006 Not sure... does this really matter to your app? Any why use timestamps anyway when there's a perfect valid DATETIME column? Link to comment https://forums.phpfreaks.com/topic/26855-mysql-from_unixtime-starting-from-1969-12-31-190000/#findComment-122811 Share on other sites More sharing options...
arianhojat Posted November 10, 2006 Author Share Posted November 10, 2006 hey fenway... i was just curious... i dont have them in any of my tables, i use DATETIME'S as well. just was helping someone here earlier with unix timestamps and was curious why got that result Link to comment https://forums.phpfreaks.com/topic/26855-mysql-from_unixtime-starting-from-1969-12-31-190000/#findComment-122834 Share on other sites More sharing options...
shoz Posted November 10, 2006 Share Posted November 10, 2006 I get accurate results in 4.1.10[code] 0 | 1970-01-01 05:00:00 | 1970-01-01 00:00:00[/code] Link to comment https://forums.phpfreaks.com/topic/26855-mysql-from_unixtime-starting-from-1969-12-31-190000/#findComment-122839 Share on other sites More sharing options...
arianhojat Posted November 10, 2006 Author Share Posted November 10, 2006 weird: i am using 4.1.12a-nt, heh i guess ill just pretend its working and never depend on unix timestamps like the other guy did :) Link to comment https://forums.phpfreaks.com/topic/26855-mysql-from_unixtime-starting-from-1969-12-31-190000/#findComment-122855 Share on other sites More sharing options...
fenway Posted November 11, 2006 Share Posted November 11, 2006 I'm not personally familiar with any minor version issues that messed this up, but having never used this column type, I probably wouldn't have ever noticed. Link to comment https://forums.phpfreaks.com/topic/26855-mysql-from_unixtime-starting-from-1969-12-31-190000/#findComment-123275 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.