Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Witam!
Chciałbym skrócić formę zapisu daty na panelu [b]tint2[/b] z takiej
[url=http://postimage.org/][img]http://s21.postimg.org/ntvzf1v87/2013_10_20_095808_218x32_scrot.png[/img][/url]
na taką
09:58 @ nie 20 paź
Tak wygląda format zapisu daty w pliku konfiguracyjnym.
#--------------------------------------------- # CLOCK #--------------------------------------------- time1_format = %H:%M @ %A %d %B time1_font = Visitor TT1 BRK 10
Dzięki za pomoc.
Ostatnio edytowany przez prosze (2013-10-20 12:15:37)
Offline
time1_format = %H:%M @ %a %d %b
Offline
Dzięki za pomoc. Oczywiście, że działa. Dodatkowe pytanie.W jakim języku napisany jest tint2 ?
Offline
Napisany jest w języku C. Dodatkowo jest jeszcze wersja tint2-svn, która wspiera np. launchery do aplikacji i kilka innych ficzerów,
Offline
A co do samego formatu daty, to poniżej masz parametry:
morfik:~$ date --help Usage: date [OPTION]... [+FORMAT] or: date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]] Display the current time in the given FORMAT, or set the system date. Mandatory arguments to long options are mandatory for short options too. -d, --date=STRING display time described by STRING, not 'now' -f, --file=DATEFILE like --date once for each line of DATEFILE -I[TIMESPEC], --iso-8601[=TIMESPEC] output date/time in ISO 8601 format. TIMESPEC='date' for date only (the default), 'hours', 'minutes', 'seconds', or 'ns' for date and time to the indicated precision. -r, --reference=FILE display the last modification time of FILE -R, --rfc-2822 output date and time in RFC 2822 format. Example: Mon, 07 Aug 2006 12:34:56 -0600 --rfc-3339=TIMESPEC output date and time in RFC 3339 format. TIMESPEC='date', 'seconds', or 'ns' for date and time to the indicated precision. Date and time components are separated by a single space: 2006-08-07 12:34:56-06:00 -s, --set=STRING set time described by STRING -u, --utc, --universal print or set Coordinated Universal Time --help display this help and exit --version output version information and exit FORMAT controls the output. Interpreted sequences are: %% 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., 20) %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, space padded ( 0..23); same as %_H %l hour, space padded ( 1..12); same as %_I %m month (01..12) %M minute (00..59) %n a newline %N nanoseconds (000000000..999999999) %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 time zone (e.g., -0400) %:z +hh:mm numeric time zone (e.g., -04:00) %::z +hh:mm:ss numeric time zone (e.g., -04:00:00) %:::z numeric time zone with : to necessary precision (e.g., -04, +05:30) %Z alphabetic time zone abbreviation (e.g., EDT) By default, date pads numeric fields with zeroes. The following optional flags may follow '%': - (hyphen) do not pad the field _ (underscore) pad with spaces 0 (zero) pad with zeros ^ use upper case if possible # use opposite case if possible After any flags comes an optional field width, as a decimal number; then an optional modifier, which is either E to use the locale's alternate representations if available, or O to use the locale's alternate numeric symbols if available. Examples: Convert seconds since the epoch (1970-01-01 UTC) to a date $ date --date='@2147483647' Show the time on the west coast of the US (use tzselect(1) to find TZ) $ TZ='America/Los_Angeles' date Show the local time for 9AM next Friday on the west coast of the US $ date --date='TZ="America/Los_Angeles" 09:00 next Fri' Report date bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report date translation bugs to <http://translationproject.org/team/> For complete documentation, run: info coreutils 'date invocation'
Offline
[quote=dominbik]Napisany jest w języku C. Dodatkowo jest jeszcze wersja tint2-svn, która wspiera np. launchery do aplikacji i kilka innych ficzerów,[/quote]
Ta wersja svn, to już od kilku lat jest normalną domyślną wersją.
tint2 (0.11+svn20110307-1) unstable; urgency=low
* New upstream snapshot (Closes: #624792)
* Remove power_now support patch (applied upstream)
* Do not install tintwizard (it does not support config of SVN snapshot)
* Also build a tint2-dbg package
— Sebastian Reichel <sre@debian.org> Sun, 01 May 2011 19:35:32 +0200[/quote]
Offline
[quote=yossarian]Ta wersja svn, to już od kilku lat jest normalną domyślną wersją.[/quote]
A no to zależy to od dystrybucji. Na Archu to są dwie różne wersje.
Offline
[quote=dominbik]A no to zależy to od dystrybucji. Na Archu to są dwie różne wersje.[/quote]
No chyba, że tak :)
Offline
Tak przypuszczałem, że tint2 napisany jest w C. Dlatego myślałem, że zmiana formatu daty nie będzie taka prosta. Jeszcze raz dzięki :)
Ostatnio edytowany przez prosze (2013-10-20 21:43:30)
Offline
Wiesz jak na tyle opcji konfiguracja i tak jest dość łatwa i intuicyjna. To, że coś jest napisane w C nie znaczy, że musi być trudne w konfiguracji. Z tego co przeglądałem w Linuxie w C jest napisanych większość "fajnych" aplikacji - czytaj lekkie, szybkie && KISS
Offline
Time (s) | Query |
---|---|
0.00014 | SET CHARSET latin2 |
0.00005 | SET NAMES latin2 |
0.00195 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='13.58.38.184' WHERE u.id=1 |
0.00077 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '13.58.38.184', 1732600000) |
0.00062 | SELECT * FROM punbb_online WHERE logged<1732599700 |
0.00061 | SELECT topic_id FROM punbb_posts WHERE id=243314 |
0.00006 | SELECT id FROM punbb_posts WHERE topic_id=24437 ORDER BY posted |
0.00070 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=24437 AND t.moved_to IS NULL |
0.00007 | SELECT search_for, replace_with FROM punbb_censoring |
0.00331 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=24437 ORDER BY p.id LIMIT 0,25 |
0.00092 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=24437 |
Total query time: 0.0092 s |