Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

How to display a Linux Time Stamp?

Solved3.96K views18th October 2023linux time
6
Dominique Bodart [DevOps Member]693 18th July 2023 0 Comments

Hi,

An API send me back information with Linux format time stamp as 32 bits Unsigned Integer like:

1689690756 which means "2023-07-18 14:32:36 UTC".  In the parameter to retrieve that value, I set "Measurment" as follow:

<Measurement>
<Type options="time">number</Type>
</Measurement>

And the result is: "19556 days 14h 32m 36s". So, its ok for the hours but not for the date. I couldn't find any reference to Linux time in the "SLC_UM_DataMinerDevelopmentLibrary_REV030" manual. So, is there a way to handle linux time in parameters and translate them properly without going through a QAction which could do the job?

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 18th October 2023

4 Answers

  • Active
  • Voted
  • Newest
  • Oldest
2
Miguel Obregon [SLC] [DevOps Catalyst]19.13K Posted 18th July 2023 1 Comment

Hi Dominique,

Linux stores time at the number of seconds since Jan 1, 1970 (epoch time). According to the documentation pointed by Koen:

The timestamp is stored internally as an OLE Automation date: a decimal number indicating the total number of days passed since Midnight 1899-12-30.

So I believe you will need to use a QAction that converts the epoch time to OLE Automation date.

Thomas Cauwelier [SLC] [DevOps Advocate] Edited comment 18th July 2023
Thomas Cauwelier [SLC] [DevOps Advocate] commented 18th July 2023

You can use the following method to convert the uint to a DateTimeOffset object.
https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.fromunixtimeseconds?view=netframework-4.6.2#system-datetimeoffset-fromunixtimeseconds(system-int64)
This object can then be converted to the OLE format that dataminer is expecting using dateTimeOffset.UtcDateTime.ToOADate().

The option on the parameter must be set to “datetime” instead of “time” to correctly display the date.

You are viewing 1 out of 4 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin