Bug 1876 - DateTime.ToShortTimeString() does not return the correct format in Greece region format
Summary: DateTime.ToShortTimeString() does not return the correct format in Greece reg...
Status: RESOLVED DUPLICATE of bug 4782
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 4.x
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-11-04 07:14 UTC by Yiannis
Modified: 2012-06-04 17:38 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
DateTime.ToShortTimeString() in Greece Region Format (20.99 KB, image/png)
2011-11-04 07:14 UTC, Yiannis
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 4782

Description Yiannis 2011-11-04 07:14:46 UTC
Created attachment 820 [details]
DateTime.ToShortTimeString() in Greece Region Format

When I call the DateTime.ToShortTimeString() and the selected device region format is "Greece", the function does not return a properly foramated time.

It returns "2:23 M", however this time format does not exist in Greece.
The correct format is "2:23 μ.μ" like in the device status bar.

See the attached image.
Comment 1 Sebastien Pouliot 2011-11-08 08:45:34 UTC
this looks like a duplicate of bug #533 - can you try the workaround (i.e. using the pattern) and tell us if this works for you ? thanks
Comment 2 Yiannis 2011-11-09 06:08:59 UTC
I do not want to hardcode the datetime pattern  because this will result in wrong formated dates and times under differents culture and user settings.

I tried the "hh:mm tt" format and it does not display the time correctly.
The output is "2:15 MM"
It should be: "2:15 μ.μ."

Also the user migth have the 24 hour format selected in his device. Thats why the ToShortTimeString method is required, so that the programmer will not have to deal with all these date and time formats and user settings under all these locales.
Comment 3 Yiannis 2011-11-09 06:34:24 UTC
One more thing to add is that the build in ShortTimePattern returns "h:mm t" which is not correct for Greece locale. It should be "h:mm tt"
Comment 4 Yiannis 2012-06-01 18:39:38 UTC
I see that this bug has a NEEDINFO status. 
Do you need some more info to resolve this issue? Can I help somehow?
Comment 5 Rolf Bjarne Kvinge [MSFT] 2012-06-04 17:38:17 UTC
This has been fixed in mono master / 2.11.

The change is a major one, so it will only reach the mobile platforms (mono for android / monotouch) when those products are rebased on the upcoming mono 2.12 release instead of the currently stable 2.10 release. This will happen some time later this year, but a date has not been set yet.

*** This bug has been marked as a duplicate of bug 4782 ***