SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
This information is a little difficult to find and not in the XFCE help (as far as I know). Here are the formatting codes that can be used when setting the XFCE Clock (on the panel) to use a Custom format. Type the codes in the text box along with any other literal text that you want displayed such as colons, periods, etc.
Code:
%% a literal %
%a locale's abbreviated weekday name (e.g., Sun)
%A locale's full weekday name (e.g., Sunday)
%b locale's abbreviated month name (e.g., Jan)
%B locale's full month name (e.g., January)
%c locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
%C century; like %Y, except omit last two digits (e.g., 21)
%d day of month (e.g, 01)
%D date; same as %m/%d/%y
%e day of month, space padded; same as %_d
%F full date; same as %Y-%m-%d
%g last two digits of year of ISO week number (see %G)
%G year of ISO week number (see %V); normally useful only with %V
%h same as %b
%H hour (00..23)
%I hour (01..12)
%j day of year (001..366)
%k hour ( 0..23)
%l hour ( 1..12)
%m month (01..12)
%M minute (00..59)
%n a newline
%p locale's equivalent of either AM or PM; blank if not known
%P like %p, but lower case
%r locale's 12-hour clock time (e.g., 11:11:04 PM)
%R 24-hour hour and minute; same as %H:%M
%s seconds since 1970-01-01 00:00:00 UTC
%S second (00..60)
%t a tab
%T time; same as %H:%M:%S
%u day of week (1..7); 1 is Monday
%U week number of year, with Sunday as first day of week (00..53)
%V ISO week number, with Monday as first day of week (01..53)
%w day of week (0..6); 0 is Sunday
%W week number of year, with Monday as first day of week (00..53)
%x locale's date representation (e.g., 12/31/99)
%X locale's time representation (e.g., 23:13:48)
%y last two digits of year (00..99)
%Y year
%z +hhmm numeric timezone (e.g., -0400)
%Z alphabetic time zone abbreviation (e.g., EDT)
As an example, I entered this for my Custom clock format.
%l:%M %p
That's a lower case "L" not a capital "i". The resulting time display looks like this.
Hm, that's funny - these look VERY similar to my "man strftime" .
If that's true it would be nice for the XFCE help to have one sentence that says "Refer to ANSI C strftime() for the Custom Clock formatting codes". I'm a n00b to Linux and don't usually know what "everyone" knows. I did honestly try to find the information in the XFCE help and online. The place where I found the formatting information didn't mention "strftime()".
You're right. The Xfce docs should at least refer to where the information on Linux date formats can be found. This isn't Xfce information in particular ... it's general Linux stuff, which makes it harder to find in Xfce-centric searches.
Eric, I just wanted to add my thanks. When I wanted to change the clock codes on my Slackware/Xfce laptop, all I knew was that I needed to know more about Xfce clock codes. So I did a Google search on "xfce clock codes". Give it a try; see what pops up as the first result. I certainly would never have known to look for a manual page on strftime, whatever that is. I think some of the most experienced Linux experts have forgotten how much they did not know when they first started using Linux. So thanks, and thanks to all the subject experts out there who have posted their expertise on this an other forums. We are completely MS-free at my small business, and it would not have been possible without this community.
You're right. The Xfce docs should at least refer to where the information on Linux date formats can be found. This isn't Xfce information in particular ... it's general Linux stuff, which makes it harder to find in Xfce-centric searches.
The xfce4-datetime-plugin (Orage clock) does say, in its configuration window, that it uses strftime and lists 10 commonly used strftime codes.
BTW, the Orage clock always shows the date whereas the standard Xfce clock only shows the date on mouse-over.
No clue why you bumped a 3 year old thread, but here you go:
1) Right click the clock in xfce4-panel
2) Click Properties
3) Under clock options, you should see your clock with a drow-down menu, click "Custom"
4) Type in whatever you want as the original poster referenced.
A HUGE thank you for posting these codes. Was having a hard time finding a way to change the 24 hour clock to am/pm. Got it working now. YEA! Bookmarked for future reference.
A HUGE thank you for posting these codes. Was having a hard time finding a way to change the 24 hour clock to am/pm. Got it working now. YEA! Bookmarked for future reference.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.