Skip to content

fast IDate/Time methods for UTC can be extended to when we can infer tz is UTC #4116

@MichaelChirico

Description

@MichaelChirico

Currently we test:

if (inherits(x, "POSIXct") && identical(attr(x, "tzone", exact = TRUE), "UTC")) 

However, if 'tzone' attribute is missing and Sys.timezone() is UTC (actually, %chin% c('GMT', 'UTC', 'Etc/UTC', 'Etc/GMT', 'GMT-0', 'GMT+0', 'GMT0') is fine), we can do the same shortcut

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions