[Cuis-dev] Fileout time is not in my timezone, is this wanted ?
Gerald Klix
cuis.01 at klix.ch
Sun Aug 15 01:52:54 PDT 2021
And now for something completely different:
The source code you posted looks like it was generated
by the decompiler. The quoted method should read:
------- ChangeSet#fileout --------------------
fileOut
"File out the receiver, to a file whose name is a function of the
change-set name and either of the date & time or chosen to have a
unique numeric tag, depending on the preference
'changeSetVersionNumbers'"
| slips nameToUse |
nameToUse _ self name.
nameToUse _ nameToUse copyReplaceAll: 'AuthorName' with: Utilities
authorName asUnaccented asCamelCase.
nameToUse _ Preferences changeSetVersionNumbers
ifTrue: [
DirectoryEntry currentDirectory
nextNameFor: nameToUse coda: '-', Utilities authorInitials
extension: 'cs.st' ]
ifFalse: [ (nameToUse , '.' , Utilities dateTimeSuffix , '.cs.st')
asFileName ].
nameToUse asFileEntry writeStreamDo: [ :stream |
-- cut ---
Did you delete your changes file?
Or did you forget to copy the original .changes together with
the original Cuis image?
HTH,
Gerald
On 8/15/21 10:24 AM, Nicola Mingotti via Cuis-dev wrote:
>
> 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>
>>
>
>
>
More information about the Cuis-dev
mailing list