remove time.now from pptx

This commit is contained in:
Alexander Wang 2024-10-15 16:36:33 -07:00
parent 20acba11e9
commit 1ac500e3c3
No known key found for this signature in database
GPG key ID: BE3937D0D52D8927
3 changed files with 1 additions and 4 deletions

View file

@ -6,6 +6,7 @@
- Lib: removes a dependency on external slog that was causing troubles with installation [#2137](https://github.com/terrastruct/d2/pull/2137) - Lib: removes a dependency on external slog that was causing troubles with installation [#2137](https://github.com/terrastruct/d2/pull/2137)
- CLI: attempts writing to path atomically, falling back to non-atomic if failed [#2141](https://github.com/terrastruct/d2/pull/2141) - CLI: attempts writing to path atomically, falling back to non-atomic if failed [#2141](https://github.com/terrastruct/d2/pull/2141)
- Export: pptx has "created at" metadata removed, so successive runs yield the same result [#2169](https://github.com/terrastruct/d2/pull/2160)
#### Bugfixes ⛑️ #### Bugfixes ⛑️

View file

@ -17,7 +17,6 @@ import (
"image/png" "image/png"
"os" "os"
"text/template" "text/template"
"time"
) )
type BoardTitle struct { type BoardTitle struct {
@ -226,15 +225,12 @@ func (p *Presentation) SaveTo(filePath string) error {
return err return err
} }
dateTime := time.Now().Format(time.RFC3339)
err = addFileFromTemplate(zipWriter, "docProps/core.xml", CORE_XML, CoreXmlContent{ err = addFileFromTemplate(zipWriter, "docProps/core.xml", CORE_XML, CoreXmlContent{
Creator: p.Creator, Creator: p.Creator,
Subject: p.Subject, Subject: p.Subject,
Description: p.Description, Description: p.Description,
LastModifiedBy: p.Creator, LastModifiedBy: p.Creator,
Title: p.Title, Title: p.Title,
Created: dateTime,
Modified: dateTime,
}) })
if err != nil { if err != nil {
return err return err