• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. ISO 8601 timestamp

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 14712
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ISO 8601 timestamp

Yaosan Yeo
Yaosan Yeo over 13 years ago

I'm trying to work with timestamp in ISO 8601 format. The timestamp looks like this: "2012-08-07T16:38:45.693245Z". I want to construct a report field which displays this date in one of the columns. I know in SKILL the standard time string looks more like this: "Aug  1 12:00:32 2012". Is there an easy way to convert my input time string to the time string SKILL recognize?

I've tried to format the input time string then use "date" in command line to convert the time stamp but it is really really slow:

date -d "2012-08-07 16:38:45.693245 UTC" "+%b %_d %k:%m:%S %Y"

Is there another way around this problem? Thanks!

  • Cancel
Parents
  • Yaosan Yeo
    Yaosan Yeo over 13 years ago

    Hi Andrew, thanks for your wonderful code, it works great! There's one minor issue with the code in the pcreSubstitute section, the "pattern" needs to be removed to prevent "only 1 argument expected" error.

    Somehow the time string returned is off by one hour, e.g. 21:53:13 in the input date string becomes 22:53:13 in the output time string. What I did is manually turn on DST in the tm structure:

    tm->tm_isdst = 1
    tm ; return

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Yaosan Yeo
    Yaosan Yeo over 13 years ago

    Hi Andrew, thanks for your wonderful code, it works great! There's one minor issue with the code in the pcreSubstitute section, the "pattern" needs to be removed to prevent "only 1 argument expected" error.

    Somehow the time string returned is off by one hour, e.g. 21:53:13 in the input date string becomes 22:53:13 in the output time string. What I did is manually turn on DST in the tm structure:

    tm->tm_isdst = 1
    tm ; return

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information