> On Aug 29, 2025, at 09:14, Mark Devine <m...@markdevine.com> wrote:
> 
> Rakoons,
--snip--
> In the end, I’m looking for elegant mechanics to get DateTime objects from 
> multiple sources (including now), perform calculations, etc., then produce 
> this format using .Str:
> YYYY-MM-DDTHH:MM:SS-04:00 
> not this format:
> YYYY-MM-DDTHH:MM:SS.806520-04:00
>  

Hi Mark,

This should work:
raku -e 'say DateTime.now.truncated-to("second");'
        2025-08-29T09:18:57-05:00

Docs:
https://docs.raku.org/type/DateTime#method_truncated-to

-- 
Hope this helps,
Bruce Gray (Util of PerlMonks)

Reply via email to