Initial commit

This commit is contained in:
Hugo Mårdbrink 2025-11-30 15:44:22 +01:00
commit a6272848f9
379 changed files with 74829 additions and 0 deletions

View file

@ -0,0 +1,12 @@
-module(gleam_time_ffi).
-export([system_time/0, local_time_offset_seconds/0]).
system_time() ->
{0, erlang:system_time(nanosecond)}.
local_time_offset_seconds() ->
Utc = calendar:universal_time(),
Local = calendar:local_time(),
UtcSeconds = calendar:datetime_to_gregorian_seconds(Utc),
LocalSeconds = calendar:datetime_to_gregorian_seconds(Local),
LocalSeconds - UtcSeconds.