Skip to content

Why is this formatting different from the stdlib? #238

@rew1nter

Description

@rew1nter

Carbon here is not even formatting. Aren't these supposed to print out the same results?

package main

import (
	"fmt"
	"time"

	"github.com/golang-module/carbon/v2"
)

func main() {
	blinkf := "2006-01-02T15:04:05.000Z07:00"
	fmt.Println(carbon.Now().Format(blinkf))
	// 2006-01-02+0615:04:05.000171894041852461633907:00
	fmt.Println(time.Now().Format(blinkf))
	// 2024-06-21T09:26:58.524+06:00
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionIndicates that an issue, pull request, or discussion needs more information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions