View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-01-2011, 10:49 AM   #1
Registered: Apr 2010
Posts: 62

Rep: Reputation: 2
Julian date converter

I have this method to convert Julian TIme to normal time via Perl.

($second, $minute, $hour) = gmtime($epochseconds);
print sprintf("%02d:%02d:%02d\n", $hour, $minute, $second);

Does anyone know a way to convert the "DATE" also in perl?

Thank You in advance for helping out
Old 02-01-2011, 10:57 AM   #2
Senior Member
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
What do you mean by "Julian Time"? If you mean the Julian Calendar, then it doesn't seem like that's what your programme is doing... It's working out the Gregorian date/time based on the input.

However, this is the output format for the gmtime function, so you can grab the day/month/year... Then, whatever non-Gregorian calendar you're trying to get to, you just need to work backwards towards the epoch making corrections


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Julian date from calender date tostay2003 Programming 17 09-03-2012 06:10 PM
date in julian format nanda22 Linux - Newbie 9 09-03-2012 06:00 PM
Julian date converter to gregorian date cheltz Linux - General 6 05-04-2010 02:02 PM
php convert julian date to gregorian format? MrUmunhum Programming 4 05-06-2009 02:37 PM

All times are GMT -5. The time now is 07:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration