Author Topic: Julian Dates  (Read 3471 times)

0 Members and 1 Guest are viewing this topic.

Offline merlin_xl54

  • Fulll Member
  • ****
  • Posts: 63
  • Karma: +2/-0
  • Not a player, just Playing!
Julian Dates
« on: 04 August, 2008, 21:18:28 »
Hi,

I've noticed that some script refer to a Julian date. Is there an easy way to understand this in regards to Ptokax & Lua? I use a script "Top Hubbers" which sets a date on first connect to a table. Example below. Is there a way to determine this as a Day Month Year format?

["Julian"] = 1216309474,

Tia,

M
Living is easy with eyes closed.

PtokaX forum

Julian Dates
« on: 04 August, 2008, 21:18:28 »

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 725
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: Julian Dates
« Reply #1 on: 04 August, 2008, 22:49:32 »
Yes. This is the number of seconds passed since 1st January 1970 00:00:00 (which is the smallest possible date for Lua amongst others). You should be able to count this.
(Moved to the appropriate forum.)
Everything could have been anything else and it would have just as much meaning.

Offline Yada

  • Newbie
  • *
  • Posts: 4
  • Karma: +2/-0
Re: Julian Dates
« Reply #2 on: 05 August, 2008, 14:33:17 »
well Thats is not really Julian Date that, it's Unix Time.

It's more like this:

Julian Date (JD) had it's Epoch BC 4713-01-01 12:00, Monday
The JC date for 2008 August 5 00:00:00 UT is 2454683.24125 days
And the Chronological Julian Day (CJD) is JD + 0.5 = 2454684 (with 0.5 representing midnight Universal Time)

And Unix time in seconds from it's Epoch 1970-01-01, Thursday
The Unix time for UTC (Coordinated Universal Time) 2008 August  5 00:00:00 is 1217894400 seconds

There is a ton of converters online and some nice scripts here in this forum that converts to Day Month Year format

Offline Jorgo

  • Double Ace
  • *
  • Posts: 103
  • Karma: +6/-6
Re: Julian Dates
« Reply #3 on: 05 August, 2008, 15:54:21 »
Actually, that was when Julian dated Jenny, somewhere in the summer of '69. It's somewhat of a rough timeframe but for a nerd it was like the eigth wonder of the world. Henceforth he wrote Julian Dates Jenny in Capitals, but when Jenny left him, just Julian Dates remained to mark the monumental affair.
« Last Edit: 05 August, 2008, 18:49:30 by Jorgo »

Offline merlin_xl54

  • Fulll Member
  • ****
  • Posts: 63
  • Karma: +2/-0
  • Not a player, just Playing!
Re: Julian Dates
« Reply #4 on: 05 August, 2008, 16:02:22 »

There is a ton of converters online and some nice scripts here in this forum that converts to Day Month Year format

Thanks.... That was what I needed. I found one online.

M
Living is easy with eyes closed.

Offline Thor

  • Scripter
  • Lord
  • ******
  • Posts: 290
  • Karma: +45/-5
    • Hungarian Direct Connect Site
Re: Julian Dates
« Reply #5 on: 05 August, 2008, 16:11:02 »
os.date() can format you: http://www.lua.org/manual/5.1/manual.html#pdf-os.date
eg. use os.date("%Y %B %d %H:%M:%S",1217894400) will result 2008 August 05 00:00:00. You can use the same variables as in C.

PtokaX forum

Re: Julian Dates
« Reply #5 on: 05 August, 2008, 16:11:02 »