REXX Date(seconds)

This is the place to ask if you have any issues with our forum system. These include questions about your account, PM's, login trouble, etc.
Post Reply
dgconder
Posts: 2
Joined: Sat Feb 15, 2020 8:59 pm

REXX Date(seconds)

Post by dgconder »

My understanding is the seconds argument to the date function should return the number of seconds in the Amiga Epoch from 1978. Instead it returns yyyymmdd Which is still useful but not what I was looking for. Not sure if the is a dos.library thing or a AREXX thing. Or some kind of user error on my part.
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1761
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: REXX Date(seconds)

Post by nbache »

No, your understanding is wrong. There's no "seconds" argument to the date() function, and no ways to make date() return a value in seconds.

See the description here: https://wiki.amigaos.net/wiki/AmigaOS_M ... ons#DATE()

Edit: PS. You can probably get what you're after with date(i) and multiplying the result by the number of seconds in a day, like this:

$ rx "numeric digits 14; say date(i) * 24 * 60 * 60"
1515369600

If you need it often, you can always define your own function to do it.

Best regards,

Niels
Post Reply