From 9202f33fd4481994d919044a05befbc2142a3755 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 15 Dec 2020 19:58:58 -0800 Subject: [PATCH] calendar: use clone >gmt in a few places. --- basis/editors/vim/generate-syntax/generate-syntax.factor | 2 +- basis/windows/time/time.factor | 4 ++-- extra/time/windows/windows.factor | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/basis/editors/vim/generate-syntax/generate-syntax.factor b/basis/editors/vim/generate-syntax/generate-syntax.factor index bbbc6c3a31..8d0b58bed9 100644 --- a/basis/editors/vim/generate-syntax/generate-syntax.factor +++ b/basis/editors/vim/generate-syntax/generate-syntax.factor @@ -66,7 +66,7 @@ CONSTANT: highlighted-vocabs { " Language: Factor " Maintainer: Alex Chapman " Last Change: ]=] write - now >gmt { YYYY " " MONTH " " DD } formatted [=[ + now-gmt { YYYY " " MONTH " " DD } formatted [=[ " Minimum Version: 600 " To regenerate: USE: editors.vim.generate-syntax generate-vim-syntax diff --git a/basis/windows/time/time.factor b/basis/windows/time/time.factor index dea0e7de40..0b6250a606 100644 --- a/basis/windows/time/time.factor +++ b/basis/windows/time/time.factor @@ -22,14 +22,14 @@ IN: windows.time : timestamp>windows-time ( timestamp -- n ) ! 64bit number representing # of nanoseconds since Jan 1, 1601 (UTC) - >gmt windows-1601 (time-) 10,000,000 * >integer ; + clone >gmt windows-1601 (time-) 10,000,000 * >integer ; : windows-time>FILETIME ( n -- FILETIME ) [ FILETIME ] dip [ 32 bits >>dwLowDateTime ] [ -32 shift >>dwHighDateTime ] bi ; : timestamp>FILETIME ( timestamp -- FILETIME/f ) - dup [ >gmt timestamp>windows-time windows-time>FILETIME ] when ; + dup [ clone >gmt timestamp>windows-time windows-time>FILETIME ] when ; : FILETIME>timestamp ( FILETIME -- timestamp/f ) FILETIME>windows-time windows-time>timestamp ; diff --git a/extra/time/windows/windows.factor b/extra/time/windows/windows.factor index efebecbd97..0b06382772 100644 --- a/extra/time/windows/windows.factor +++ b/extra/time/windows/windows.factor @@ -5,5 +5,5 @@ windows.kernel32 kernel classes.struct calendar ; IN: time.windows M: windows set-system-time - >gmt + clone >gmt timestamp>SYSTEMTIME SetSystemTime win32-error=0/f ; -- 2.34.1