diff --git a/std/time/zoneinfo_unix.jule b/std/time/zoneinfo_unix.jule index 2e457e87..2395ecf2 100644 --- a/std/time/zoneinfo_unix.jule +++ b/std/time/zoneinfo_unix.jule @@ -7,10 +7,7 @@ // See tzfile(5), https://en.wikipedia.org/wiki/Zoneinfo, // and ftp://munnari.oz.au/pub/oldtz/ -use integ "std/jule/integrated" - -cpp unsafe fn getenv(name: *integ::Char): *integ::Char -cpp unsafe fn setenv(name: *integ::Char, value: *integ::Char, overwrite: int): int +use "std/sys" // Many systems use /usr/share/zoneinfo, Solaris 2 has // /usr/share/lib/zoneinfo, IRIX 6 has /usr/lib/locale/TZ, @@ -31,7 +28,7 @@ fn initLocal() { // /usr/share/zoneinfo/foo will be used. mut tz := "TZ\000" - tz = unsafe { integ::BytePtrToStr((*byte)(cpp.getenv((*integ::Char)(&tz[0])))) } + tz, _ = unsafe { sys::Getenv(&tz[0]) } match { | len(tz) == 0: mut z, ok := loadLocation("localtime", ["/etc"])