f



is the value of "clock scan today" correct (tcl 8.6)

Hi,

I was surprised that the clock value of "now" and "today" are equal:

    % expr {[clock scan now] == [clock scan today]}
    1

I expected the "today"s value to be:

    % clock format [clock scan today]
    Mon Jan 21 18:52:47 CET 2013
    % clock format [clock scan {last day + 24 hours}]
    Mon Jan 21 00:00:00 CET 2013

Why behaves the clock value "today" this way?
Is it a bug or intention?

Best regards,

Martin

BTW: where is the word "this" for free form times/dates valid?
0
1/21/2013 5:53:54 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

2 Replies
408 Views

Similar Articles

[PageSpeed] 25

At 2013-01-21 12:53PM, "MartinLemburg@Siemens-PLM" wrote:
>  BTW: where is the word "this" for free form times/dates valid?

Probably a bug. I imagine it is supposed to be used like the relative
modifiers "next" and "last":

% clock format [clock scan "12:01 monday"]
Mon Jan 28 12:01:00 EST 2013
% clock format [clock scan "12:01 next monday"]
Mon Feb 04 12:01:00 EST 2013
% clock format [clock scan "12:01 last monday"]
Mon Jan 21 12:01:00 EST 2013
% clock format [clock scan "12:01 this monday"]
unable to convert date-time string "12:01 this monday": syntax error (characters 5-9)



-- 
Glenn Jackman
    Write a wise saying and your name will live forever. -- Anonymous
0
glennj (645)
1/22/2013 6:07:38 PM
Yes, it seems so!

The "today" keyword seems to be for relative time movements, too:

    % clock format [clock scan {0:00:00 today}]
    Thu Jan 24 00:00:00 CET 2013

Best regards,

Martin

Am Dienstag, 22. Januar 2013 19:07:38 UTC+1 schrieb gj:
> At 2013-01-21 12:53PM, "MartinLemburg@Siemens-PLM" wrote: > BTW: where is=
 the word "this" for free form times/dates valid? Probably a bug. I imagine=
 it is supposed to be used like the relative modifiers "next" and "last": %=
 clock format [clock scan "12:01 monday"] Mon Jan 28 12:01:00 EST 2013 % cl=
ock format [clock scan "12:01 next monday"] Mon Feb 04 12:01:00 EST 2013 % =
clock format [clock scan "12:01 last monday"] Mon Jan 21 12:01:00 EST 2013 =
% clock format [clock scan "12:01 this monday"] unable to convert date-time=
 string "12:01 this monday": syntax error (characters 5-9) -- Glenn Jackman=
 Write a wise saying and your name will live forever. -- Anonymous

0
1/24/2013 10:31:16 AM
Reply:

Similar Artilces:

"::tcl::tm::UnknownHandler ::tclPkgUnknown msgcat 1.4" caused by replacing Tcl 8.4.1 with 8.5.7
In the blog http://planet.larrythecow.org/archives/2009-07-26.html "The Twouble with Tcl" Iain Buchanan shows that redefining OPEN proc leads to the errors similar to what I am getting - when I replaced Tcl 8.4.1 with Tcl 8.5.7. In my case I don't know the exact root cause though ... Any ideas how I should proceed with debugging this issue ? Thanks, Alex tclsh c:/Tornado/host/resource/hutils/tcl/makeSymTbl.tcl ppc tmp.o symTbl.c invalid command name "::tcl::tm::UnknownHandler" while executing "::tcl::tm::UnknownHandler ::tclPkgUnknown msg...

http::geturl returns "data error" with tcl 8.6
I have troubles using the http::geturl with RIPE's REST API. With TCL 8.5 it works: % puts $tcl_version 8.5 % package require http 2.7.5 % http::geturl http://www.hp.com/index.html ::http::1 % http::geturl http://rest.db.ripe.net/search ::http::2 % With 8.6 it doesn't: % puts $tcl_version 8.6 % package require http 2.8.7 % http::geturl http://www.hp.com/index.html ::http::1 % http::geturl http://rest.db.ripe.net/search data error % Why am I getting this "data error" back ? What specific Tcl 8.6 version ([info patchlevel]) ? 8.6.2 had some ...

Start of Domino 6 fails after changing "lang" value on Redhat 8
I changed the value of "lang" variable in the file /etc/sysconfig/i18n from LANG="de_DE.UTF-8" to LANG="de_DE.ISO-8859-1" because I had some problems with midnight commander concerning its grafical elements during telnet sessions and with some function keys. But now, start of Domino 6 fails. Undoing the changes, Domino 6 is OK again. What can I do to solve both, using the right character set and keep Domino 6 running? Maybe I have to edit some Domino ini-files to say Domino, whitch character set to use? But which file(s) do I have to edit? If you nee...

Problem with TDBC in Tcl 8.6.0: version conflict for package "TclOO"
Hi, I've got a problem with Tcl 8.6.0. I tried to run my tcls-script, but received the following error: version conflict for package "TclOO": have 0.7, need 1.0.1 while executing "load c:/tcl_x86/lib/teapot/package/win32-ix86/lib/tdbc_mysql1.0.0/tdbcmysql100.dll tdbcmysql" ("package ifneeded tdbc::mysql 1.0.0" script) invoked from within "package require tdbc::mysql " (file "myscript.tcl" line 4) Looks like the problem is in tdbc. I have already tried to install another version of tdbc, but it didn't help. This problem occures only in 8.6.0 Tcl version. Can anybody help me? Am Montag, 21. Oktober 2013 15:38:51 UTC+2 schrieb gama...@gmail.com: > Hi, > > I've got a problem with Tcl 8.6.0. I tried to run my tcls-script, but received the following error: > > > > version conflict for package "TclOO": have 0.7, need 1.0.1 > > while executing > > "load c:/tcl_x86/lib/teapot/package/win32-ix86/lib/tdbc_mysql1.0.0/tdbcmysql100.dll tdbcmysql" > > ("package ifneeded tdbc::mysql 1.0.0" script) > > invoked from within > > "package require tdbc::mysql " > > (file "myscript.tcl" line 4) > > > > Looks like the problem is in tdbc. I have already tried to install another version of tdbc, but it didn't help. This problem occures o...

"""""""""ADD ME""""""""""
Hi , Hope you are doing great. Please let me take this opportunity to introduce myself, Iam Karthik working with BhanInfoi Inc, a NY based company. We have consultants on our bench on various technologies, my request is to add me to your distribution list and kindly do send me the requirements. i have the below list available 1. Mainframe 2. Java 3.. Financial Analyst 4. Data Architect If there is any vendor ship agreement which has to be signed then I would like to take an opportunity to represent my company and expect your cooperation... ...

BWidget tree can't be "packed" in latest tcl/tk (8.6.b1.1)
With windows (2k/xp) and 8.6b1 tcl/tk in a tclkit my code works. I just found a newer tclkit, 8.6b1.1 and the below test code is now suddenly broken. It gets an error on the second pack statement: "cannot use geometry manager pack inside .wtree_top.sw which already has slaves managed by grid" Is there a new restriction (or one that is now enforced) that has recently been added that causes this to break? It would be a rather sad development if I could no longer use BWidget trees with the pack manager. -------------------------------------- I built my own tclk...

checkbuttons in tcl 8.4.12 and 8.5a4 with -offvalue == ""?
Hello, I just realized some differences between the checkbuttons visualisation in tcl 8.4 and 8.5. If the offvalue of a checkbutton is set to "" (empty string) and the checkbutton is not "checked", than ... - in tcl 8.4.12 the background is white - in tcl 8.5a4 the background is grey and the "check" is still visible That's a bug, isn't it? If the offvalue is " " (one blank), than every thing works. Best regards, Martin Lemburg UGS - Transforming the Process of Innovation MartinLemburg@UGS wrote: > Hello, > > I just reali...

not equal? "5".to_i+ "6".to_i and "5".to_i +"6".to_i
ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-linux] >> "5".to_i+ "6".to_i => 11 >> "5".to_i +"6".to_i => 5 maybe it's a mistak? > >> "5".to_i+ "6".to_i > => 11 > >> "5".to_i +"6".to_i > => 5 The second case +"6".to_i is treated as an argument for to_i method. This will make it more obvious: >> "111".to_i +"2".to_i => 7 "111".to_i +"2".to_i is equivalent to "111".to_i(2), hence the result....

Urgent Requirement in """""""""""""NEW YORK""""""""""""""""
Hello Partners, Please find the requirement below. Please send the updated resume along with rate and contact no. REQ#1: Title : Java Developer ( Rating Project) Duration : 6 months Rate : open Location : NY strong java, WebLogic 9.2, Web Services, Oracle REQ#2: Title : Java Developer Duration : 4 months Rate : open Location : NY Strong java, SQL REQ#3: Title : VB.Net Consultant Location : NY Duration : 4 months Rate : open Primarily looking at someone who has Excel, VB.net and Oracle (good to have). Req #4: Title : Java Developer (MSA Project) Duration : 6+ months Rate : open Location : NY Note : Please send your updated resume along with contact no karthik@bhaninfo.com : No phone calls please. Thanks & Regards Karthik BhanInfo karthik@bhaninfo.com ...

"pipe" in Tcl 8.5ff
Hi, I am looking for a replacement of the "pipe" command of tclx. This command creates a FIFO and returns one fd for reading and one for writing. A similar command in C is #include <unistd.h> int pipe(int pipefd[2]); How do I do that with plain Tcl (version >= 8.5)? Best regards Ole Στις 8/8/2013 2:38 μμ, ο/η Olе Streicher έγραψε: > Hi, > > I am looking for a replacement of the "pipe" command of tclx. This > command creates a FIFO and returns one fd for reading and one for > writing. A similar command in C is > > #include <unistd.h> > int pipe(int pipefd[2]); > > How do I do that with plain Tcl (version >= 8.5)? > > Best regards > > Ole > In tcl 8.6, with the "chan pipe" command. In tcl 8.5, with the tclpipe extension: http://wiki.tcl.tk/21637 If you need this for executing commands, see the man page for "open" and possibly "exec". George Hi George, George Petasis <petasisg@yahoo.gr> writes: > Στις 8/8/2013 2:38 μμ, ο/η Olе Streicher έγραψε: >> I am looking for a replacement of the "pipe" command of tclx. > In tcl 8.6, with the "chan pipe" command. In tcl 8.5, with the tclpipe > extension: > > http://wiki.tcl.tk/21637 Is there a way to do it in plain tcl, without the need to compile an external package? > If you need this for executing commands, ...

about "++" and "--"
why this program snippet display "8,7,7,8,-7,-8" the program is: main() { int i=8; printf("%d\n%d\n%d\n%d\n%d\n%d\n",++i,--i,i++,i--,-i++,-i--); } > why this program snippet display "8,7,7,8,-7,-8" Ask your compiler-vendor because this result is IMHO implementation-defined. Check this out: http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.15 http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.16 Regards, Irina Marudina fxc123@gmail.com wrote: > why this program snippet display "8,7,7,8,-7,-8&q...

"If then; if then;" and "If then; if;"
I have a raw data set which is a hierarchical file: H 321 s. main st P Mary E 21 F P william m 23 M P Susan K 3 F H 324 S. Main St I use the folowing code to read the data to creat one observation per detail(P) record including hearder record(H): data test; infile 'C:\Documents and Settings\retain.txt'; retain Address; input type $1. @; if type='H' then input @3 Address $12.; if type='P' then input @3 Name $10. @13 Age 3. @16 Gender $1.; run; but the output is not what I want: 1 321 s. main H 2 321 s. main P Mary E 21 F 3 321 s...

"or" and "and"
Hi, I'm just getting to discover ruby, but I find it very nice programming language. I just still don't understand how the "or" and "and" in ruby... I was playing with ruby and for example made a def to print Stem and Leaf plot (for those who didn't have a statistics course or slept on it, e.g. http://cnx.org/content/m10157/latest/) Here is the Beta version of it: class Array def n ; self.size ; end def stem_and_leaf(st = 1) # if st != (2 or 5 or 10) then ; st = 1 ; end k = Hash.new(0) self.each {|x| k[x.to_f] += 1 } k = k.sort{|a, b| a[0].to_f <=&g...

"/a" is not "/a" ?
Hi everybody, while testing a module today I stumbled on something that I can work around but I don't quite understand. >>> a = "a" >>> b = "a" >>> a == b True >>> a is b True >>> c = "/a" >>> d = "/a" >>> c == d True # all good so far >>> c is d False # eeeeek! Why c and d point to two different objects with an identical string content rather than the same object? Manu Emanuele D'Arrigo wrote: >>>> c = "/a" >>>&...

"my" and "our"
Hi, while testing a program, I erroneously declared the same variable twice within a block, the first time with "my", the second time with "our": { my $fz = 'VTX_Link'; .... ( around 200 lines of code, all in the same block) our $fz = 'VTX_Linkset'; ... } So the initial contents of the $fz declared with "my" is lost, because "our" creates a lexical alias for the global $fz, thus overwriting the previous "my" declaration. It was my error, no question. But I wonder why Perl doesn't mention this - even with "use s...

why "::", not "."
Why does the method of modules use a dot, and the constants a double colon? e.g. Math::PI and Math.cos -- Posted via http://www.ruby-forum.com/. On Oct 26, 2010, at 01:48 , Oleg Igor wrote: > Why does the method of modules use a dot, and the constants a double > colon? > e.g. > Math::PI and Math.cos For the same reason why inner-classes/modules use double colon, because = they're constants and that's how you look up via constant namespace. Math::PI and ActiveRecord::Base are the same type of lookup... it is = just that Base is a module and PI is a float....

"out" and "in out"
Hi i found the following explaination: In Ada, "in" parameters are similar to C++ const parameters. They are effectively read-only within the scope of the called subprogram. Ada "in out" parameters have a reliable initial value (that passed in from the calling subprogram) and may be modified within the scope of the called procedure. Ada "out" parameters have no reliable initial value, but are expected to be assigned a value within the called procedure. What does "have no reliable initial value" mean when considering the "out" parameter? By c...

How to do PHP "require()" or TCL "source" in bash script
I'm sorry but I can't figure out how to explain this any better than this. In PHP we have a command "require()" that obtains a file and logically places it into another file. I cannot figure out how to do this in bash script as the requirement is necessary for a migration script to obtain the code from a .cfg file and then be able for the "parent" script to run the code it "imported" from the .cfg file, much like PHP's require() or TCL's "source". This is what I have so far and it fails: if [ -f ivc.cfg ]; then cat ivc.cfg fi Anyone...

"In" "Out" and "Trash"
I just bought a new computer and I re-installed Eudora Light on my new computer. But when I open Eudora, the "In", "Out" and "Trash" links are not on the left side of the screen the way they were on my old computer. How can I get these links back on the left side of the screen? Thank you. On 25 Mar 2007 09:49:22 -0700, "abx" <abfunex@yahoo.com> wrote: >I just bought a new computer and I re-installed Eudora Light on my new >computer. But when I open Eudora, the "In", "Out" and "Trash" links >are ...

Does it need a ";" at the very after of "if" and "for"
write code like: int main(void) { int a=10; if(a<20) {} } Compiler ok on dev-cpp . don't we have to add a ";" after if statement? marsarden said: > write code like: > > int main(void) > { > int a=10; > if(a<20) > {} > } > > Compiler ok on dev-cpp . don't we have to add a ";" after if > statement? The syntax for 'if' is: if(expression) statement There is no semicolon after the ) but before the statement. The statement is either a normal statement (which can be empty), ending in a semicolon:- if(expr) ...

A problem about "[ ]" "( )" "="
I want to read several images saved in a director,and give them to I1,I2 ,I3....,using the following codes: filelist=dir(['c:\MATLAB701\work\...\*.jpg']); for i=1 :length(filelist) I=imread(fullfile('c:\MATLAB701\work\...',filelist(i).name)); end; but failed. Then I used I(i)=imread... ,still failed. How could I do? "John" <mailofww@126.com> wrote in message news:ef19e12.-1@webx.raydaftYaTP... >I want to read several images saved in a director,and give them to > I1,I2 ,I3....,using the following codes: > filelist=dir(['c:\MATLAB701\work\.....

Looking for binary "expect" and "TCL/Tk" (if required) for OpenServer6
Does anybody know where to find "expect" (and related requirements) for OpenServer6? I can download the source files from nist.gov, but they do not compile. The MAN pages are already loaded on the system, so I suspect the programs would be on the distribution media somewhere. Any help would be appreciated. Thanks, Rick On 9 Feb, 17:57, Rick_Hoyle <motosl...@hotmail.com> wrote: > Does anybody know where to find "expect" (and related requirements) > for OpenServer6? I can download the source files from nist.gov, but > they do not compile. The MAN pages are al...

"cargo" (alias "tag")
Every canvas item can have its own "tag" (and even the list); from the docs: #v+ -tags tagList Specifies a set of tags to apply to the item. TagList consists of a list of tag names, which replace any existing tags for the item. TagList may be an empty list. #v- I'm wondering, could it be hard to equip every widget with such ability? It would be quite useful, to have the possibility to add arbitrary value (could be even limited to text, like in case of canvas tags) inserted in such "cargo" field (so it was named in Clipper). -- ZB ZB wrote: > Every canvas...

Problem clock scan "ccyymmdd hhmm" when hh="00"
This works: clock scan "20060117 0130" This fails: clock scan "20060117 0030" The man page says it supports time in hhmm format and works for all hours except "00". When using hours as "00", clock scan interprets minutes as hours for mm up to 23, then for mm> 23 fails: clock scan "20060117 00$mm" Now if you append another "00" onto hhmm, it seems to work but the man page does not really say that a time format of "hhmmss" is valid. We use a lot of file names tagged with ccyymmdd_hhmm. So is it safe to just append another...

Web resources about - is the value of "clock scan today" correct (tcl 8.6) - comp.lang.tcl

Resources last updated: 3/10/2016 5:34:43 PM