Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6782939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:48:15+00:00 2026-05-26T16:48:15+00:00

I need to convert Julian timestamp to Regular timestamp in UNIX using Bash. On

  • 0

I need to convert Julian timestamp to Regular timestamp in UNIX using Bash.

On Tandem OS, conversion is pretty straightforward –

Example:
212186319010244541

$OLSAPP SYSTST 1> #interprettimestamp 212186319010244541

#interprettimestamp 212186319010244541 expanded to:

2455860 2011 10 25 16 10 10 244 541

I wish to do the same on UNIX environment. The conversion will be a part of a parser script. So one-liners would be greatly appreciated.

UPDATE:

INTERPRETTIMESTAMP inbuilt function on Tandem returns a space-separated list of nine numbers, consisting of the Julian day number, year, month, day, hour, minute, second, millisecond, and microsecond.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:48:16+00:00Added an answer on May 26, 2026 at 4:48 pm

    Assuming the number is as @blahdiblah says

    “a value representing the number of microseconds since January 1, 4713 B.C.”

    Then you first need to know the Julian timestamp for 01-JAN-1970 which is the epoch for unix time. So a cludgy oracle query gives

    210866803200000000
    

    Then you could in theory just have a shell command to compute the number of seconds since 1-Jan-1970.

    unixtime=$(( ( 212186319010244541 - 210866803200000000 ) / 1000000 ))
    

    The problems with this are:

    • you still need to format it
    • your bash may not like integer arithmatic with 18 digit numbers. (think its OK in 64 bit, but not 32 bit).

    Now if you have perl installed you can solve these using the bigint and POSIX modules. As a shell “one” liner it looks like

    perl -mbigint -mPOSIX -e 'print( POSIX::strftime("%Y-%m-%d %T",localtime( ($ARGV[0]-210866803200000000)/1000000 ) )."\n")' 212186319010244541
    

    Which gives

    2011-10-25 15:10:10
    

    The 1 hour difference is probably due to daylight savings differences. It could be either in the perl, or more likely the value I used for 01-Jan-1970 could be an hour out. So you may need to check both of them to be sure its right for your system.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I convert from a unix timestamp (say 1232559922) to a fractional julian
I need to convert a date in format eg. 2011-01-02 to a unix timestamp
I need to convert a 20digits decimal to binary using C programming. What buffer
I need to convert the video into png images. I did that using ffmepg.
I need to convert from a standard Gregorian date to a Julian day number.
I need to convert the following format into a new format using NSDateFormatter. 'Fri,
I need to convert latitude/longitude coordinates into Easting/Northing coordinates in the Alberta 10 TM
I need to convert a named instance of SQL server 2005, to a default
I need to convert HTML documents into valid XML, preferably XHTML. What's the best
I need to convert a (possibly) null terminated array of ascii bytes to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.