Skip to content

Instantly share code, notes, and snippets.

@Ovis
Created January 28, 2019 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ovis/fe76308522e4649fd6cb50b0bc4dddbf to your computer and use it in GitHub Desktop.
Save Ovis/fe76308522e4649fd6cb50b0bc4dddbf to your computer and use it in GitHub Desktop.
Linux上でTimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time")を用いた場合のエラーメッセージ
Unhandled Exception: System.AggregateException: One or more errors occurred. (The time zone ID 'Tokyo Standard Time' was not found on the local computer.) ---> System.TimeZoneNotFoundException: The time zone ID 'Tokyo Standard Time' was not found on the local computer. ---> System.IO.FileNotFoundException: Could not find file '/usr/share/zoneinfo/Tokyo Standard Time'.
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at Internal.IO.File.ReadAllBytes(String path)
at System.TimeZoneInfo.TryGetTimeZoneFromLocalMachine(String id, TimeZoneInfo& value, Exception& e)
--- End of inner exception stack trace ---
at System.TimeZoneInfo.FindSystemTimeZoneById(String id)
(後略)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment