Skip to content

Added a warning for CLI mode if env TZ is not set.#384

Draft
jhs507 wants to merge 1 commit intomasterfrom
timezone_warning
Draft

Added a warning for CLI mode if env TZ is not set.#384
jhs507 wants to merge 1 commit intomasterfrom
timezone_warning

Conversation

@jhs507
Copy link
Collaborator

@jhs507 jhs507 commented Jul 18, 2022

This implements a warning that displays in CLI mode when the environment variable TZ is not set. The warning tells the user that performance may be impacted and encourages them to set the variable. If TZ is set the set timezone will be output.

The portability of this needs to be checked on windows systems running the CLI.

Setting the TZ variable positivity impacts performance on systems where the call to mktime() in StandardConverterUtility::Calculate_TdateTime_Offset and StandardConverterUtility::EncodeDateTime ends up calling the system utility tzset which uses the TZ environment variable.

This implementation may not be good for all systems.

@jhs507 jhs507 marked this pull request as draft July 18, 2022 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cashe timezone so that timezone file only has to be accessed once per simulation.

1 participant