How do I change the system-wide short date format in Ubuntu? For example, Thunderbird is showing dates in the DD/MM/YY format, and I would like to change it to MM/DD/YY or YYYY-MM-DD.
The best information I can find so far is in this thread:
http://ubuntuforums.org/showthread.php?t=193916
Edit: I want to change the system-wide date format, so that all my applications use this new date format.
Install and launch "dconf Editor", navigate to com -> canonical -> indicator -> datetime.
Set the value of time-format to custom.
Customize the Time & Date format by editing the value of custom-time-format, e.g. set it to %Y-%m-%d %H:%M:%S for "2017-12-31 23:59:59" format.
Re-login to see effect of the changes.
You can also do this via a command in terminal:
gsettings set com.canonical.indicator.datetime time-format 'custom'
gsettings set com.canonical.indicator.datetime custom-time-format '%Y-%m-%d %H:%M:%S'
Source: http://ubuntuhandbook.org/index.php/2015/12/time-date-format-ubuntu-panel/
How to do this in 2017 with Ubuntu 16.04 (Xenial Xerus) is described here. Cut/Paste follows below in case that site goes away:
Change date and measurement formats
You can control the formats that are used for dates, times, numbers, currency, and measurement to match the local customs of your region.
Click the icon at the very right of the menu bar and select System Settings.
Open Language Support and select the Regional Formats tab.
Select the region that most closely matches the formats you'd like to use. By default, the list only shows regions that use the language set on the Language tab.
You have to log out and back in for these changes to take effect.
Click the icon at the very right of the menu bar and select Log Out to log out.
After you've selected a region, the area below the list shows various examples of how dates and other values are shown. Although not shown in the examples, your region also controls the starting day of the week in calendars.
Thunderbird uses the system's date format, and that format depends on the system's locale settings. You have two options:
modify the system locale, the instructions are in the forum thread you linked above, or
set LC_TIME to a locale that uses the format you want. The article linked by Craig H suggests en_DK.
The instructions here worked for me to create a custom locale based on en_US. Then Thunderbird showed the date/time format how I want (I prefer YYYY-MM-DD over MM/DD/YY).
Some time later, the date/time format in Thunderbird changed back to what was set in en_US (MM/DD/YY), because I had inadvertently set $LC_ALL to en_US.UTF-8. So, I sudo gedit /etc/environment and changed LC_ALL="en_US.UTF-8" to LC_ALL="custom.UTF-8". Finally, Thunderbird is showing the dates how I want them.
Related
I'm based in the UK and I'm developing an MS Access 2016 database for an American client.
How can I change the language settings for this database only and not Access in general so, for example in table design view field format options for date appear appear as mm/dd/yyyy, mm/dd/yy etc rather than dd/mm/yyyy, dd/mm/yy?
I know I can format the data post-hoc using SQL or VBA but I'd prefer to set the behaviour as default at the design stage to limit the potential for error.
Many thanks.
Update, here's the options currently presented for the field format:
You can set the Format property of table fields and textboxes to: mm/dd/yyyy
But that will not change the behaviour of, say, DateValue which still will read a date string like "6/7/2016" as 2016-07-06 using your Windows settings.
So the real answer is that you can not. And neither should you need it - if you don't apply custom formats, your database will display dates as m/d/yyyy when reaching your American client.
If you want to see your application in action, install a virtual machine with US settings, and test your application in this environment.
Very simple question (hopefully) but I can't find the answer anywhere. I have two seemingly identical date prompts for optional date ranges. One defaults to today's date. The other defaults to 'earliest' and 'latest'. But I can't for the life of me find the setting that controls this.
(I'm not trying to do anything advanced such as dynamical defaults, using javascript.)
Please help. Thanks.
A single-select date prompt with the Required property set to 'No' and the Range property set to 'Yes' will show the Earliest and Latest radio buttons and have them selected as default. When the Required property is set to 'Yes' the date prompts default to the current date. Thus, your two date prompts likely have different settings for the Required property.
I have a time field on my form with widget set to 'single_text'.
My US users will want 12 hour am/pm format.
http://symfony.com/doc/current/reference/forms/types/time.html#widget
Although it's not entirely obvious, that accepts an input of 2:15pm but if the form returns because of a validation error on another field or is later opened to edit an existing record then it displays 14:15 which of course is correct but is probably off-putting.
How do I get it to display 2:15pm? I don't see an option to do that.
Well, this turns out to be harder than it should be. The problem is that the Time form type does not allow you to specify a format like the Date form type does and the format it uses is H:i. Yes, 24-hour format :-(
So, the only solution is to build your own form type which uses the h:i format. You can find instructions for how to build your own form type here:
http://symfony.com/doc/2.1/cookbook/form/create_custom_field_type.html
Then you can use the Time form type as the base for your form type and just change the format it uses. The Time form type can be found here:
/Symfony/Component/Form/Extension/Core/Type/TimeType.php
I'm a newbie drupal guy,
I use http://drupal.org/project/date module for my events date, but this module displays TIME as well as default, and I can't turn that off from configuration pages unless I'm a blind :/ is there any way to display only DATE value?
Appreciate helps!! thanks a lot!
You need to add a new date and time format that only specifies the date portion under Administer › Site configuration › Date and time › Formats › Add format (the relative path is /admin/settings/date-time/formats/add).
Here are a couple of popular date formats strings according to the PHP date format characters:
m/d/Y becomes 06/22/2010
l, F j, Y becomes Tuesday, June 22, 2010
You can either set one of the three default format types (i.e. long, medium, or short) to use your custom format or you can add a new format type. In either case, you would just need to specify the date field to use the format type that is set to your custom date format.
See Display multiple Date formats, along with Theme the Date and Example - Theme all-day events without a time for more information on this (while the last two links are targeting Drupal 5, they still apply for Drupal 6, AFAIK).
I have some problems while making my own theme for wordpress. Currently I'm making a comment system that was updated in wordpress 2.7 (you now that one with treated comments).
I'm following the codex and everything is fine except the date-time output of each comment - now it is looking like this: %A %B %e%q, %Y at %I:%M %p . Instead of showing me the date and time of the comment.
I've checked my Date Format and Time Format settings in my admin panel and they seem to be set as needed (Date Format: 2009/11/13 and Time Format: 13:30). Maybe there is any parameter that should be passed to the wp _ list _ comments() function?
Look at the template that is displaying your comments. Going to guess that display of comment_date is not coded correctly.
The Date and Time Format in your control panel does NOT typically control how the theme displays date and time information.
Also see: Formatting Date and Time