Results 1 to 2 of 2

Thread: An interactive calender

  1. #1
    Join Date
    Jun 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default An interactive calender

    Hey im looking to make a calender in the format of:

    Thursday, 19th of June 1980.

    But i need one that does not follow the my pc clock. Let me explain. Im trying to make a website/game type of thing which starts in the 1800's. But when i make a clock using pc clock it displays modern day time.

    Further to add, i need the time to be used in variables because some codes will be checking the in-game clock so it will know when to run certain blocks of php code etc.

    Any one know how to do this ?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    timestamps are the number of seconds since 1970. We're at like 110000000 something now. Most computers/applications use timestamps to store data.

    This presents a problem... you can't store 1800 in a system that starts at 1970.

    So what I'd suggest is adjusting this in one of two ways:
    1. You could just use normal timestamps and create a new way to parse them so that it's 1770 instead of 1970, and that should work.
    Or,
    2. You could parse the timestamp, get the year, then subtract ~200 from the year value, and you'd get June 10, 2007.... minus 200 years = June 10, 1807.

    Or, just create your own system. Not sure what else to say.

    You could use normal time and use differences from points in time (if you were on from 2pm to 4:30pm, that would be 2.5 hours), then just add those differences to your chosen starting time.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •