siezma Posted September 9, 2007 Share Posted September 9, 2007 Hello, I have implemented a tag cloud widget for my application. Everything works fine except the creation date. The widget gets the data from xml file. You can see some data below; <?xml version="1.0" encoding="UTF-8"?> <response> <tags> <tag created="1171020448890" freq="170" rank="100" tagtitle="photography" /> <tag created="1171111779109" freq="136" rank="80" tagtitle="nightNikon" /> <tag created="1171020449328" freq="80" rank="47" tagtitle="macro" /> <tag created="1171020449015" freq="79" rank="46" tagtitle="flickr" /> <tag created="1171020448890" freq="78" rank="45" tagtitle="lattimore" /> </tags> </response> I have created a table including created field as a datetime format. And when i am fetching it from the database, I am using the sql below; SELECT UNIX_TIMESTAMP(created) AS utimestamp,freq,rank,tagtitle FROM tag ORDER BY freq DESC LIMIT 100 But when the application shows the date, it shows "1/14/1970" or something like that. Also returning timestamp is 10 digits from mysql, but the timestamp which widget using is 13 digits. I am not good at time at php. What i am doing wrong? What is this EPOCH time? Note: This is not a 3rd party app problem. My question and problem is not about the widget.The problem is about php and mysql date functions. So pls don't tell me to send it under 3rd party app! Quote Link to comment https://forums.phpfreaks.com/topic/68547-solved-epoch-time-php-and-mysql/ Share on other sites More sharing options...
wastedthelight Posted October 8, 2007 Share Posted October 8, 2007 How'd you solve this issue? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/68547-solved-epoch-time-php-and-mysql/#findComment-364604 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.