mirror of
https://github.com/vlang/v.git
synced 2025-09-15 15:32:27 +03:00
time: turn Time.unix to i64, so it can represent times before 1970-01-01, fix time operators, add more tests (#11050)
This commit is contained in:
parent
1bf6d04e37
commit
efa8dcf4d2
15 changed files with 107 additions and 40 deletions
|
@ -275,7 +275,7 @@ const (
|
|||
// users or business transactions.
|
||||
// (https://news.ycombinator.com/item?id=14526173)
|
||||
pub fn ulid() string {
|
||||
return ulid_at_millisecond(time.utc().unix_time_milli())
|
||||
return ulid_at_millisecond(u64(time.utc().unix_time_milli()))
|
||||
}
|
||||
|
||||
// ulid_at_millisecond does the same as `ulid` but takes a custom Unix millisecond timestamp via `unix_time_milli`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue