Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 3
    wait, are you just trying to convert a datetime from one timezone to another? Because if that's the case, you should do that, and not try to add hours manually (that breaks down in so many corner cases!) Commented Oct 20, 2023 at 18:34
  • 1
    There is no -d, --date= flag in the date utility provided by AIX. Unfortunately, it is not very clear to me what you are attempting to accomplish so I am unable to suggest how you might fix it. Commented Oct 20, 2023 at 19:00
  • 1
    You also can't convert dates through timezones using the date command on AIX unless you've got GNU date installed. In your question please explain what you're trying to achieve (not how you think it should be done) because I suspect it'll need a bit of perl or python to do right Commented Oct 20, 2023 at 19:01
  • I have to add offset hours to the UTC time. If the date is 2023-10-19 00:00:00.000000 and the system is running in EDT timeZone, add 4 hrs to it and make it 2023-10-19 04:00:00.000000. As that is what makes the 3rd party API will return me the result for current timeZone. Commented Oct 20, 2023 at 21:03
  • Sorry, I don't understand. "If the date is..." According to whom is the date like that? UTC? The Timezone of that third party service? Your time zone? What does that API really expect? Is that documented somewhere? Commented Oct 20, 2023 at 23:28