* CHAN.DATE CHAN.TIME

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
User avatar
Ron Melby
Megastar
Posts: 917
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

CHAN.DATE CHAN.TIME

Post by Ron Melby »

I cannot seem to read and write these with a plugin in the normal way. I see in the export gedcom, it is done with read file line instead of an interface with pointers. Is that the only way?
FH V.6.2.7 Win 10 64 bit
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: CHAN.DATE CHAN.TIME

Post by tatewise »

There are several reasons why the Export Gedcom File Plugin reads & writes GEDCOM files directly.
There are quite a few genuine FH tags such as CHAN that cannot be accessed via Plugins.
There are also plenty of custom tags needed by target products that cannot be created by Plugins as they are invalid in FH.

You will discover that the CHAN.DATE & CHAN.TIME data references are not satisfactorily support anywhere in FH.
I imagine the reason is the potential conflict between FH managing those Updated timestamps and users doing the same.

You can access the CHAN.DATE & CHAN.TIME data indirectly.
The LastUpdated(...) function allows the Date & Time to be read.
By creating & deleting a data item allows the current Date & Time to be written.

See my Set Missing Updated Timestamps Plugin for examples of what I'm talking about.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Ron Melby
Megastar
Posts: 917
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

Re: CHAN.DATE CHAN.TIME

Post by Ron Melby »

i actually saw that. I want to control the date and time. and 'now' isnt the date I am looking for....LOL
FH V.6.2.7 Win 10 64 bit
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: CHAN.DATE CHAN.TIME

Post by tatewise »

The only way to do that is to read & write the whole GEDCOM file directly.
Afterwards, FH will report the file has been changed and request to reload it, just as it does when AS changes it.
BUT reading and writing Unicode UTF-16 or UTF-8 encoded GEDCOM files is far from trivial.
If you really need to do so then you will need my encoder module embedded in the Export Gedcom File Plugin.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Ron Melby
Megastar
Posts: 917
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

Re: CHAN.DATE CHAN.TIME

Post by Ron Melby »

I was thinking that, except I dont understand it, so it is rather daunting.
FH V.6.2.7 Win 10 64 bit
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: CHAN.DATE CHAN.TIME

Post by tatewise »

Could you please explain why you wish to modify the Updated date-time stamps on records.
It appears at first sight to be an unusual thing to do. Maybe there is another way to achieve your objective.

If you are determined to go ahead, then you will have to accept my encoder module as it stands, without understanding how it works, and just use it as directed. The method of use is much the same as the standard ANSI file read method.
It also requires my general module and stringx module.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply