Explorar o código

Add "UTC" variable

This adds a "UTC" variable, akin to the "local" variable to be
used for more convenient timezone conversion.
Andrew Chin hai 1 ano
pai
achega
beb421eafc
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      numbat/modules/datetime/functions.nbt

+ 1 - 0
numbat/modules/datetime/functions.nbt

@@ -6,5 +6,6 @@ fn format_datetime(format: String, input: DateTime) -> String
 fn get_local_timezone() -> String
 fn tz(tz: String) -> Fn[(DateTime) -> DateTime]
 let local: Fn[(DateTime) -> DateTime] = tz(get_local_timezone())
+let UTC: Fn[(DateTime) -> DateTime] = tz("UTC")
 fn unixtime(input: DateTime) -> Scalar
 fn from_unixtime(input: Scalar) -> DateTime