Hi Daniel, Following is my reply to your queries. ------- Original Message ------- Sender : Daniel Willmann<d.willm...@samsung.com> Engineer/SERI-Samsung Linux Platform (SLP)/Samsung Electronics Date : Aug 24, 2012 19:06 (GMT+05:30) Title : Re: [E-devel] [Patch] [Elementary] elm_datetime widget bug fix : Display AM/PM string(s) in all locales
> Hello, > On 08/24/2012 02:03 PM, Rajeev Ranjan wrote: >> [Root cause]: >> Some locales don't have AM/PM string since they strictly follow 24 HR >> format and the this case is not handled in datetime widget. >> >> [Change Description]: >> Datetime widget is modified to display default AM/PM strings incase, if, >> it is not present in the locale. > Is that still going to display AM/PM even if the hours are in 24h mode? > If so I am against this. I quite like my 24h time :-) Nope, it will not show AM/PM if hours are in 24h mode :). > >> + // If a locale doesn't support AM/PM strings, set the default values >> + if ((buf[0] == 0) && (!strncmp(fmt, "%p", BUFF_SIZE) || strncmp(fmt, >> "%P", BUFF_SIZE))) > Here you probably want to negate the second strncmp() as well, so: > ... && (!strncmp() || !strncmp()) > Basically checking here if AM/PM is not present in the buffer(inside locale string) and user wants AM/PM(by checking format here; will be set in case of 12 hour settings), then setting AM/PM based on the current time. > > Regards > Daniel Regards, Rajeev ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel