Date and time format question

Paul Dupuis paul at researchware.com
Mon Jul 29 19:50:29 EDT 2024


On 7/29/2024 6:14 PM, Bob Sneidar via use-livecode wrote:
> Simpler than that:
>
> on mouseUp
>     put "Mon, 29 Jul 2024 15:49:52 -0400" into tDateTime
>     put word -1 of tDateTime into tOffset
>     -- delete last word of tDateTime
>     convert tDateTime to seconds
>     put (tOffset / 100) *60 *60 into tOffset
>     add tOffset to tDateTime
>     convert tDateTime to  long date and  long time
>     put tDateTime
> end mouseUp

(tOffset / 100)

  isn't quite right as the time zone offset (i.e. something like -0400) 
is actually hhmm, so an offset like NewFoundLand -0330, if divided by 
100 becomes 3.3 when it should be 3.5 since 30 minutes if half and hour.


More information about the use-livecode mailing list