[Cuis-dev] Fileout time is not in my timezone, is this wanted ?

Nicola Mingotti nmingotti at gmail.com
Sun Aug 15 01:24:35 PDT 2021


Hi Phil,

I did some digging, unluckily i did not find the answer to my question.
It would require a tougher digging ;)

Changeset -> FileoutAndKeep calls:
ChangeSorter # fileOutAndKeep, which calls
myChangeSet fileout, and inside that there is written
Utilities dataTimeSuffix   (But, not called always)

------- ChangeSet#fileout --------------------
fileOut
     | temp1 temp2 |
     temp2 _ self name.
     temp2 _ temp2
         copyReplaceAll: 'AuthorName'
         with: Utilities authorName asUnaccented asCamelCase.
     temp2 _ Preferences changeSetVersionNumbers
         ifTrue: [
             DirectoryEntry currentDirectory
                 nextNameFor: temp2
                 coda: '-' , Utilities authorInitials
                 extension: 'cs.st' ]
         ifFalse: [ (temp2 , '.' , Utilities dateTimeSuffix , '.cs.st') 
asFileName ].
     temp2 asFileEntry writeStreamDo: [ :argm3_3 |
-- cut--
-------------------------------------------------------

So "Utilities dateTimeSuffix" is not called always, only if there does 
not exist "Preferences changeSetVersionNumber".

Now:
--- in my workspace ---
Utilities dateTimeSuffix .  " '2021-08-15_09.47.14' "
DateAndTime now.          " 2021-08-15T09:47:16.832436+00:00 "
------------------------------

Observe they give the same time, let's forget about the locale that will 
be in another episode ;)
=> The "problem" is not there

But this is the fileout i made 5 mins ago via ChangeSorter
----- shell ----
$> date
Sun 15 Aug 2021 09:50:06 AM CEST
$> p at deb4:~/prog/smalltalk$ ls -lrt | grep CuisCore
-rw-r--r--  1 p p    4267 Aug 15 09:43 
4739-CuisCore-NicolaMingotti-2021Aug14-12h01m-NM.001.cs.st
-----------------

Observe the 'Aug14-12h01' has nothing to do with DateTimeNow now, nor 
Utilities dateTimeSuffix output.

My conclusion for the moment is:
. If on fileout some relevant timing is found about the changeset then 
that data&time is used
. If on fileout some relevant timing about the change is not found than 
the current data&time is used.


Bye
Nicola









On 8/14/21 8:20 PM, Phil B wrote:
> See DateAndTime class>>localTimeZone:
>
> On Sat, Aug 14, 2021 at 1:51 PM Nicola Mingotti via Cuis-dev 
> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>
>     Hi again,
>
>     final question for today;)
>
>     I did a fileout about one hour ago, i noticed the time in the filename
>     is about 9 hours back respect to Rome time. But `DateTime now` gives
>     the correct time for my timezone.
>
>     Is this output wanted or a mini-bug ?
>
>     bye
>     Nicola
>
>
>
>
>     -- 
>     Cuis-dev mailing list
>     Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>     https://lists.cuis.st/mailman/listinfo/cuis-dev
>     <https://lists.cuis.st/mailman/listinfo/cuis-dev>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210815/96b64324/attachment.htm>


More information about the Cuis-dev mailing list