diff --git a/synautil.pas b/synautil.pas index 54b2f9c..dd34aee 100644 --- a/synautil.pas +++ b/synautil.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 004.015.007 | +| Project : Ararat Synapse | 004.016.000 | |==============================================================================| | Content: support procedures and functions | |==============================================================================| -| Copyright (c)1999-2017, Lukas Gebauer | +| Copyright (c)1999-2023, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c) 1999-2017. | +| Portions created by Lukas Gebauer are Copyright (c) 1999-2023. | | Portions created by Hernan Sanchez are Copyright (c) 2000. | | Portions created by Petr Fejfar are Copyright (c)2011-2012. | | All Rights Reserved. | @@ -124,6 +124,9 @@ function TimeZone: string; 'Fri, 15 Oct 1999 21:14:56 +0200')} function Rfc822DateTime(t: TDateTime): string; +{:Returns date and time in format defined in RFC-3339 in format "yyyy-mm-ddThh:nn:ss.zzz"} +function Rfc3339DateTime(t: TDateTime): string; + {:Returns date and time in format defined in C compilers in format "mmm dd hh:nn:ss"} function CDateTime(t: TDateTime): string; @@ -491,6 +494,13 @@ end; {==============================================================================} +function Rfc3339DateTime(t: TDateTime): string; +begin + Result := FormatDateTime('yyyy"-"mm"-"dd"T"hh":"nn":"ss"."zzz', t) + Timezone; +end; + +{==============================================================================} + function CDateTime(t: TDateTime): string; var wYear, wMonth, wDay: word;