this should be a bug, date +%X
man date says:
%X locale’s time representation (e.g., 23:13:48) date (GNU coreutils) 7.4 gives: $ date +%X 03:04:42 PM ^^ ^^^^^------- this instead it should just be $ date +%X 15:04:42 -- ubuntu-users mailing list ubuntu-users@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users |
this should be a bug, date +%X
On Fri, Oct 12, 2012 at 6:07 PM, Evuraan <evuraan@gmail.com> wrote:
> man date says: > > %X locale’s time representation (e.g., 23:13:48) > > date (GNU coreutils) 7.4 gives: > > $ date +%X > 03:04:42 PM > ^^ ^^^^^------- this > > instead it should just be > > $ date +%X > 15:04:42 No it shouldn't... check your locale. For example, en_US: % Appropriate time representation (%X) % "%r" t_fmt "<U0025><U0072>" % % Appropriate AM/PM time representation (%r) % "%I:%M:%S %p" t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025> <U0053><U0020>/ <U0025><U0070>" This tells date that the appropriate time representation for the en_US locale is exactly what you are seeing. -- ubuntu-users mailing list ubuntu-users@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users |
this should be a bug, date +%X
On 12/10/12 17:57, J wrote:
> On Fri, Oct 12, 2012 at 6:07 PM, Evuraan <evuraan@gmail.com> wrote: >> man date says: >> >> %X locale’s time representation (e.g., 23:13:48) >> >> date (GNU coreutils) 7.4 gives: >> >> $ date +%X >> 03:04:42 PM >> ^^ ^^^^^------- this >> >> instead it should just be >> >> $ date +%X >> 15:04:42 > > No it shouldn't... check your locale. For example, en_US: > > % Appropriate time representation (%X) > % "%r" > t_fmt "<U0025><U0072>" > % > % Appropriate AM/PM time representation (%r) > % "%I:%M:%S %p" > t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025> <U0053><U0020>/ > <U0025><U0070>" > > > This tells date that the appropriate time representation for the en_US > locale is exactly what you are seeing. > Indeed, and expected, coreutils respects locale. A quick check shows: [cerdea-aws]cerdea@xango3:/build/buildd$ env LC_TIME="en_US.UTF-8" date +%X 07:35:36 PM [cerdea-aws]cerdea@xango3:/build/buildd$ env LC_TIME="en_DK.UTF-8" date +%X 19:35:48 [cerdea-aws]cerdea@xango3:/build/buildd$ date --version date (GNU coreutils) 8.13 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by David MacKenzie. [cerdea-aws]cerdea@xango3:/build/buildd$ ..C.. -- ubuntu-users mailing list ubuntu-users@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users |
this should be a bug, date +%X
>> This tells date that the appropriate time representation for the en_US
>> locale is exactly what you are seeing. ah..! makes sense. Thanks for clarifying. -- ubuntu-users mailing list ubuntu-users@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users |
| All times are GMT. The time now is 11:21 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.