You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The std/time library could use a function to get the local time. One potential use for this, besides knowing the time, is as a random seed for the random number generator.
The std/time library is implemented in vm/packages.cpp. I think we should just use the ctime functions to implement this.
The get_local_time function should return an object with fields based on the C tm struct. However, I would rename the fields to make them more intuitive, eg: year, month, day, week_day, year_day, is_dst. I also propose that we do not include tm_year (years since 1900) because that is retarded.
The text was updated successfully, but these errors were encountered:
The
std/time
library could use a function to get the local time. One potential use for this, besides knowing the time, is as a random seed for the random number generator.The
std/time
library is implemented in vm/packages.cpp. I think we should just use the ctime functions to implement this.The
get_local_time
function should return an object with fields based on the C tm struct. However, I would rename the fields to make them more intuitive, eg: year,month
,day
,week_day
,year_day
,is_dst
. I also propose that we do not includetm_year
(years since 1900) because that is retarded.The text was updated successfully, but these errors were encountered: