Page 1 of 1

Long Time format not including real seconds digits ? Solved :)

Posted: Tue Apr 13, 2021 3:06 am
by liveme
HI ppl,
Running this code under Linux, I can not get the real seconds digits, it just round those to :00

4:02:00 PM

is there a way to get the real seconds 2 digits ?
thanks :

Code: Select all

  
   set UseSystemDate to false
   put time() into mytim
   convert mytim to long time
   answer mytim
   
*if set to "true", no time content is returned at all... :?:
Could my System Date not return seconds at all ?!! My Desktop clock does displays seconds fine right now.

Thanks

Re: Long Time format not including real seconds digits ?

Posted: Tue Apr 13, 2021 9:50 am
by richmond62
Maybe I'm missing something, but I just did this:
-
SShot 2021-04-13 at 11.49.44.png
SShot 2021-04-13 at 11.49.44.png (12.4 KiB) Viewed 3163 times

Re: Long Time format not including real seconds digits ?

Posted: Tue Apr 13, 2021 9:59 am
by FourthWorld
"Time" does not include seconds, so converting it will not include anything more granular than minutes, because nothing more granular is in the string being converted.

Richmond's suggestion of "long time" should do what you need.

If your system will be used across multiple time zones you may consider storing time in "seconds" or "Internet date" to have time zone adjustments is handled automatically during format conversions.

Re: Long Time format not including real seconds digits ?

Posted: Wed Apr 14, 2021 6:46 am
by liveme
Thanks guys,
"put" worked out better than
"convert"...now showing seconds.

Also internet date might be very usefull next...will see !
Cool :wink: