[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] convert from 'date +"%H-%M %m-%d-%Y"' to seconds from 1970



HTCondor expects ISO 8601 format for abstime(). So, space is not a valid
delimiter between the date and the time.

Perhaps, "2020-05-06T12:00:00" would work better.

...Tim

On 5/5/20 5:18 AM, Beyer, Christoph wrote:
> Hi,
>
> thanks, maybe my question was a bit misleading, I know there are a couple of ways to convert date formats into unix time and back. 
>
> What I mean to do is put a 'human readable time' into a classadd: 
>
> down.time = "2020-05-06 12:00" 
>
> and use it for start calculations where I need it to be unix time, hence 
>
> down.time.sec = abstime(down.time) 
>
> Seems to be a way but I do not get it to work right now, maybe someone is using the abstime() function and can give me a hint, it needs to go into the startd_add obviously ...
>
> best
> christoph 
>
-- 
Tim Theisen
Release Manager
HTCondor & Open Science Grid
Center for High Throughput Computing
Department of Computer Sciences
University of Wisconsin - Madison
4261 Computer Sciences and Statistics
1210 W Dayton St
Madison, WI 53706-1685
+1 608 265 5736