1
scarfie
Dates in database USER table...
  • 2004/3/25 19:53

  • scarfie

  • Just popping in

  • Posts: 9

  • Since: 2004/3/22


I'm building a seperate application to pull info from my XOOPS database and I am completely stumped by how XOOPS writes the date to the database.

Example: 1080227530 is an entry in the last_login column of the users table.

What kind of mathematical interpolation is going on here?

I've put my calculator through its paces and just can't land on the right answer.

Help?!

2
Mithrandir
Re: Dates in database USER table...

Hehe - it IS quite a hard calculation.

The date format is called a UNIX timestamp, which counts the number of seconds since 1/1 1970.

More on PHP Dates and Times

3
scarfie
Re: Dates in database USER table...
  • 2004/3/25 23:07

  • scarfie

  • Just popping in

  • Posts: 9

  • Since: 2004/3/22


What the #$%* is that?!?

Well that's a new one!

Thank you Mith.

Hey let me say that I was wondering how long it would take to get an answer on this one and it was super fast.

This community rocks and so does Xoops!

Back to my calculator and some astro physics to figure out what day it is...

4
Mithrandir
Re: Dates in database USER table...

You did find the functions in the PHP manual, right?

date('[format]', [timestamp]); will give you a nicely formatted date. No need for calculators

with date(), time() and mktime() you have all the date functions, you'll need for the next 30 years or so.

(and don't get too accustomed to half-hour replies... sometimes you are lucky, sometimes you are not - place your bets and spin the wheel )

5
scarfie
Re: Dates in database USER table...
  • 2004/3/25 23:54

  • scarfie

  • Just popping in

  • Posts: 9

  • Since: 2004/3/22


Yes I did find the functions in the PHP manual...thanks!

That splains everything.

Login

Who's Online

220 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 220


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits