|
Programming C, bash, Python, Perl, PHP, Java, you name it. |
|
Thread Tools | Display Modes |
|
|||
REQUEST: Programm for changing the clock
Can anyone write me a program in BSD for changing the clock's format from 12 to 24 hours, like: 1:30pm - 13:30 and 14:20 - 2:30 pm
|
|
|||
ooohhh I mean VISUAL BASIC
Last edited by J65nko; 16th January 2010 at 11:34 AM. Reason: Swearing removed |
|
|||
I honestly have no idea what your second post meant, but I'll try my best at simplifying this for you.
Traditional UNIX kernels only know time as seconds passed since the UNIX epoch, internally the clock is set to UTC time, it is functions within the C library that convert time into your preferred timezone.. and format it into something more human readable (..not a scary integer). If you're asking about the date(1) program, it allows you to specify custom formatting desires.. passing parameters onto a helpful little function in the C library, strftime(3). The following demonstrates 12 hour time, in the format of hour:minutes:seconds and AM/PM notation. $ date "+%r" The '%r' option is standardized by POSIX, it is the equivalent of '%I:%M:%S %p'. Is this adequate enough? or are you asking how to configure a desktop environment like GNOME or KDE to use 12 hour time? Last edited by BSDfan666; 16th January 2010 at 08:14 AM. |
|
||||
On Windows use the appropriate control panel applet to change date/time formats under your regional settings; I run my XP machine using ISO standard time/date formats.
On UNIX, just use date or configure the clocklet on your desktop. For all in between, just write a custom clock >_>.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Request for sh script for compressing files | bgobs | Programming | 5 | 16th January 2010 07:20 PM |
Request for guides | milo974 | General software and network | 1 | 16th December 2009 06:42 PM |
configure clock in xfce | delboy | FreeBSD General | 7 | 3rd September 2008 06:36 PM |
Request for Opinions: A secure way of sharing modules | TerryP | Off-Topic | 2 | 10th August 2008 07:18 PM |
can't set clock? | carpman | FreeBSD General | 31 | 7th July 2008 11:26 PM |