remove usage of obsolete clock option -gmt

Bug #454856 reported by buzzdee on 2009-10-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Coccinella
Low
buzzdee

Bug Description

As poinged out by Sander, the usage of the boolean -gmt option to clock command is obsolete.
https://bugs.launchpad.net/coccinella/+bug/441223/comments/3

It is used all over the place, and should be removed.

buzzdee (sebastia) wrote :
Download full text (4.1 KiB)

citing: http://www.tcl.tk/man/tcl8.5/TclCmd/clock.htm
-gmt boolean
    If boolean is true, specifies that a time specified to clock add, clock format or clock scan should be processed in UTC. If boolean is false, the processing defaults to the local time zone. This usage is obsolete; the correct current usage is to specify the UTC time zone with “-timezone :UTC” or any of the equivalent ways to specify it.

The -gmt is used in these places:

$ grep -r -e "-gmt" * | grep -v svn
bin/unix/Linux/i686/vfs1.3/zipvfs.tcl: return [clock scan $dt -gmt 1]
bin/unix/Linux/i686/snack2.2/snack.tcl: set tmp x[clock format [expr {int($t)}] -format "%M:%S" -gmt 1]
bin/unix/Linux/i686/snack2.2/snack.tcl: set tmp [clock format [expr {int($t)}] -format "%H:%M:%S" -gmt 1]
bin/unix/NetBSD/i686/vfs1.3/zipvfs.tcl: return [clock scan $dt -gmt 1]
bin/unix/NetBSD/i686/snack2.2/snack.tcl: set tmp x[clock format [expr {int($t)}] -format "%M:%S" -gmt 1]
bin/unix/NetBSD/i686/snack2.2/snack.tcl: set tmp [clock format [expr {int($t)}] -format "%H:%M:%S" -gmt 1]
bin/windows/intel/vfs1.3/zipvfs.tcl: return [clock scan $dt -gmt 1]
bin/windows/intel/Snack2.2/snack.tcl: set tmp x[clock format [expr {int($t)}] -format "%M:%S" -gmt 1]
bin/windows/intel/Snack2.2/snack.tcl: set tmp [clock format [expr {int($t)}] -format "%H:%M:%S" -gmt 1]
contrib/tablelist/scripts/tablelistEdit.tcl:# "-gmt 1" option for the mentry::putClockVal and mentry::getClockVal commands,
contrib/tablelist/scripts/tablelistEdit.tcl: if {[string compare $arg "-gmt"] == 0} {
contrib/tablelist/scripts/tablelistEdit.tcl: if {[string compare $arg0 "-gmt"] != 0} {
contrib/tablelist/scripts/tablelistEdit.tcl: return -code error "bad option \"$arg0\": must be -gmt"
contrib/tablelist/scripts/tablelistEdit.tcl: mwutil::wrongNumArgs "addDateMentry format separator ?-gmt? ?name?"
contrib/tablelist/scripts/tablelistEdit.tcl: $name-putValueCmd "mentry::putClockVal %T %W -gmt $useGMT" \
contrib/tablelist/scripts/tablelistEdit.tcl: $name-getValueCmd "mentry::getClockVal %W -gmt $useGMT" \
contrib/tablelist/scripts/tablelistEdit.tcl:# "-gmt 1" option for the mentry::putClockVal and mentry::getClockVal commands,
contrib/tablelist/scripts/tablelistEdit.tcl: if {[string compare $arg "-gmt"] == 0} {
contrib/tablelist/scripts/tablelistEdit.tcl: if {[string compare $arg0 "-gmt"] != 0} {
contrib/tablelist/scripts/tablelistEdit.tcl: return -code error "bad option \"$arg0\": must be -gmt"
contrib/tablelist/scripts/tablelistEdit.tcl: mwutil::wrongNumArgs "addTimeMentry format separator ?-gmt? ?name?"
contrib/tablelist/scripts/tablelistEdit.tcl: $name-putValueCmd "mentry::putClockVal %T %W -gmt $useGMT" \
contrib/tablelist/scripts/tablelistEdit.tcl: $name-getValueCmd "mentry::getClockVal %W -gmt $useGMT" \
contrib/httpex.tcl: -format "%a, %d %b %Y %H:%M:%S GMT" -gmt 1} modTime]} {
contrib/tinyhttpd.tcl: -format "%a, %d %b %Y %H:%M:%S GMT" -gmt 1]
contrib/tinyhttpd.tcl: -format "%a, %d %b %Y %H:%M:%S GMT" -gmt 1]
jabber/RosterTree.tcl: set tstr [...

Read more...

buzzdee (sebastia) wrote :

in svn revision #2747 all occurences of -gmt 1 are replaced with -timezone :UTC
Left out stuff below the bin directory and
contrib/tablelist/scripts/tablelistEdit.tcl
The latter only seems to be used by contrib/tablelists/scripts/repair.tcl,
whereas the repair.tcl was used to repair some arrays to fix bugs in TCL versions < 8.5
Due to the fact that tcl 8.5 is required now, the tablelistEdit.tcl was not updated.

Changed in coccinella:
status: Confirmed → In Progress
buzzdee (sebastia) on 2009-10-25
Changed in coccinella:
assignee: nobody → buzzdee (sebastia)
buzzdee (sebastia) wrote :

I use this since two weeks, and don't see a problem since then, changing state to fix committed.

Changed in coccinella:
status: In Progress → Fix Committed
buzzdee (sebastia) on 2009-12-03
Changed in coccinella:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers