projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a270f04
)
[corlib] Assume UTC if no $TZ set. Fixes #30360
author
Marcin Cieslak
<saper@saper.info>
Sun, 7 Jun 2015 20:14:47 +0000
(20:14 +0000)
committer
Marcin Cieslak
<saper@saper.info>
Sun, 7 Jun 2015 22:19:56 +0000
(22:19 +0000)
Don't throw System.TimeZoneNotFoundException
if no $TZ is set and there is no /etc/localtime
or similar file.
mcs/class/corlib/System/TimeZoneInfo.cs
patch
|
blob
|
history
diff --git
a/mcs/class/corlib/System/TimeZoneInfo.cs
b/mcs/class/corlib/System/TimeZoneInfo.cs
index 717bfa77c76f088a90578bb57be795b567fda494..6babee889ca384c087d538644829ade8c5fdfee8 100644
(file)
--- a/
mcs/class/corlib/System/TimeZoneInfo.cs
+++ b/
mcs/class/corlib/System/TimeZoneInfo.cs
@@
-116,11
+116,11
@@
namespace System
try {
return FindSystemTimeZoneByFileName ("Local", "/etc/localtime");
- } catch {
+ } catch
(TimeZoneNotFoundException)
{
try {
return FindSystemTimeZoneByFileName ("Local", Path.Combine (TimeZoneDirectory, "localtime"));
- } catch {
- return
null
;
+ } catch
(TimeZoneNotFoundException)
{
+ return
Utc
;
}
}
}