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 Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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] Quote Link to comment 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 :) Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.