@@ -51,7 +51,7 @@ struct TimeZone:
5151 @ staticmethod
5252 fn local () -> TimeZone:
5353 var local_t = c_localtime(0 )
54- return TimeZone(local_t.tm_gmtoff.to_int( ), " local" )
54+ return TimeZone(int ( local_t.tm_gmtoff), " local" )
5555
5656 @ staticmethod
5757 fn from_utc (utc_str : String) raises -> TimeZone:
@@ -247,15 +247,15 @@ struct Morrow:
247247 tz = TimeZone(0 , " UTC" )
248248 else :
249249 tm = c_localtime(t.tv_sec)
250- tz = TimeZone(tm.tm_gmtoff.to_int( ), " local" )
250+ tz = TimeZone(int ( tm.tm_gmtoff), " local" )
251251
252252 var result = Self(
253- tm.tm_year.to_int( ) + 1900 ,
254- tm.tm_mon.to_int( ) + 1 ,
255- tm.tm_mday.to_int( ),
256- tm.tm_hour.to_int( ),
257- tm.tm_min.to_int( ),
258- tm.tm_sec.to_int( ),
253+ int ( tm.tm_year) + 1900 ,
254+ int ( tm.tm_mon) + 1 ,
255+ int ( tm.tm_mday),
256+ int ( tm.tm_hour),
257+ int ( tm.tm_min),
258+ int ( tm.tm_sec),
259259 t.tv_usec,
260260 tz,
261261 )
@@ -264,13 +264,13 @@ struct Morrow:
264264 @ staticmethod
265265 fn fromtimestamp (timestamp : Float64) raises -> Self:
266266 var timestamp_ = normalize_timestamp(timestamp)
267- var t = CTimeval(timestamp_.to_int( ))
267+ var t = CTimeval(int (timestamp_ ))
268268 return Self._fromtimestamp(t, False )
269269
270270 @ staticmethod
271271 fn utcfromtimestamp (timestamp : Float64) raises -> Self:
272272 var timestamp_ = normalize_timestamp(timestamp)
273- var t = CTimeval(timestamp_.to_int( ))
273+ var t = CTimeval(int (timestamp_ ))
274274 return Self._fromtimestamp(t, True )
275275
276276
0 commit comments