Skip to content

Timestamp-like strings lose quote #889

Open
@deblaci

Description

What steps did you take:

When I provide a string but contains timestamp, after templating with Ytt this strings lose the quote.
This would be valid, but yaml parsers handle this as a date not a string and convet it like Mon Sep 20 12:00:00 CEST 2021.
This happens even I turn on strict yaml, according to rule "requires strings with colon to be explicitly quoted"

template.yaml:
exampleTimestamp: "2023-01-01T07:00:00"

ytt -f template.yaml
ytt -f template.yaml -s

What happened:

exampleTimestamp: 2023-01-01T07:00:00

What did you expect:

exampleTimestamp: "2023-01-01T07:00:00"

Environment:

  • ytt version (use ytt --version): ytt version 0.47.0
  • OS (e.g. from /etc/os-release):
    ProductName: macOS
    ProductVersion: 14.2.1
    BuildVersion: 23C71

Vote on this request

👍 "I would like to see this addressed as soon as possible"

Metadata

Assignees

Labels

blocked on upstreamFeature is blocked on upstream projectbugThis issue describes a defect or unexpected behaviorcarvel acceptedThis issue should be considered for future work and that the triage process has been completed

Type

No type

Projects

  • Status

    Unprioritized

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions