Bug 621408 - TimeZoneInfo.FindSystemTimeZoneById(TimeZoneInfo.Local.Id) throws a TimeZoneNotFoundException
Summary: TimeZoneInfo.FindSystemTimeZoneById(TimeZoneInfo.Local.Id) throws a TimeZoneN...
Status: NEW
Alias: None
Product: Mono: Class Libraries
Classification: Mono
Component: Sys.Core (show other bugs)
Version: 2.6.x
Hardware: i686 openSUSE 11.2
: P5 - None : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-10 08:14 UTC by Daniel Sell
Modified: 2010-08-19 10:43 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Sell 2010-07-10 08:14:58 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4

When trying to find a TimeZoneInfo by Id, you can't use the local TimeZoneInfo's Id.

TimeZoneInfo.Local.Id results in "Local"

"Local" is not a valid Id for any TimeZoneInfo in TimeZoneInfo.GetSystemTimeZones()

Reproducible: Always

Steps to Reproduce:
1. $> csharp
2. TimeZoneInfo.FindSystemTimeZoneById(TimeZoneInfo.Local.Id);
Actual Results:  
System.TimeZoneNotFoundException: Exception of type 'System.TimeZoneNotFoundException' was thrown.
  at System.TimeZoneInfo.FindSystemTimeZoneByFileName (System.String id, System.String filepath) [0x00000] in <filename unknown>:0 
  at System.TimeZoneInfo.FindSystemTimeZoneById (System.String id) [0x00000] in <filename unknown>:0 
  at Class6.Host (System.Object& $retval) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00000] in <filename unknown>:0 
  at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <filename unknown>:0 


Expected Results:  
A TimeZoneInfo representing the current time zone should be returned.

$> mono --version
Mono JIT compiler version 2.6.7 (tarball Thu Jul  8 20:11:11 UTC 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
	TLS:           __thread
	GC:            Included Boehm (with typed GC and Parallel Mark)
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  x86
	Disabled:      none
Comment 1 Daniel Sell 2010-07-10 08:20:29 UTC
I forgot to mention that I did try this on MS .NET and it worked as intended.