### ImageMagick version

7.1.1-24

### Operating system

Windows

### Operating system, version and so on

7, 6.1.7601

### Description

When I `-set date:modify` to a valid value, it is not used for `png:tIME`. Instead, `png:tIME` is determined each time a PNG file is written. I believe this is the intentional behavior as it is corresponding to how `date:create` and `date:modify` work, which are determined each time a file is read in turn.

But then, when I `-set date:modify` to an invalid timestamp, IM complains about it and doesn't write the `png:tIME` chunk at all.

I would like to understand:
If `png:tIME` is determined each time a PNG file is written, why does IM complain about an invalid timestamp specified by `date:modify` and why does it not keep determining it in this case?


### Steps to Reproduce

```
>magick convert xc: -set date:modify 2000-01-01T12:00:00Z Valid.png
>magick identify -verbose Valid.png
[...]
    png:tIME: 2024-01-03T12:34:56Z
[...]

>magick convert xc: -set date:modify foo Invalid.png
convert: Invalid date format specified for png:tIME `Invalid.png' (ret=0) @ error/png.c/write_tIME_chunk/7839.
>magick identify -verbose Invalid.png
(png:tIME missing)
```

### Images

_No response_
Though the value set to date:modify is not used for png:tIME, setting an invalid timestamp still yields an error
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Though the value set to date:modify is not used for png:tIME, setting an invalid timestamp still yields an error
Issue date:

--- start body ---
### ImageMagick version

7.1.1-24

### Operating system

Windows

### Operating system, version and so on

7, 6.1.7601

### Description

When I `-set date:modify` to a valid value, it is not used for `png:tIME`. Instead, `png:tIME` is determined each time a PNG file is written. I believe this is the intentional behavior as it is corresponding to how `date:create` and `date:modify` work, which are determined each time a file is read in turn.

But then, when I `-set date:modify` to an invalid timestamp, IM complains about it and doesn't write the `png:tIME` chunk at all.

I would like to understand:
If `png:tIME` is determined each time a PNG file is written, why does IM complain about an invalid timestamp specified by `date:modify` and why does it not keep determining it in this case?


### Steps to Reproduce

```
>magick convert xc: -set date:modify 2000-01-01T12:00:00Z Valid.png
>magick identify -verbose Valid.png
[...]
    png:tIME: 2024-01-03T12:34:56Z
[...]

>magick convert xc: -set date:modify foo Invalid.png
convert: Invalid date format specified for png:tIME `Invalid.png' (ret=0) @ error/png.c/write_tIME_chunk/7839.
>magick identify -verbose Invalid.png
(png:tIME missing)
```

### Images

_No response_
--- end body ---
