-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
data and time #22
Comments
Hi @gedw99 There is no plan to add You should keep a machine-readable format in the database, yes. But I don't understand the association with the libraries? |
I agree that fat dependencies are a bad idea. I think we can write our own pretty easily if your up for it. You said you did not understand the need ? Well say you have a sentence that has numbers or date time in it. You want to show it in the Users own locale of how they represent date time. But you also need to convert that date time to their dat time zone too. Typically date time is always stored as UTC time in any medium ( db, etc ) and converted on the fly to the users own data time zone. so thats just 2 primary examples that combine into 1. |
I understand that time must be kept in a machine-readable format during machine processing. (e.g. databases). However, I don't quite understand what role spreak or carbon play here. Spreak can convert a time into a human-readable format in different languages. Carbon does the same, in addition, it offers a lot of functions for editing time and timezones. There is no necessary connection between time zone and language. Can you perhaps give a brief example of what should or should not work? |
yeah I think your right about not needing carbon. The use case is that you have a string that has date time in it and we need to convert that date time into the the users locale. So for German versus English the structure of how Date time is presented as a string is very different. Hope fully that is a concise enough example use case ? I think I need to play with the code and see what it can handle with data time aspects. |
Describe the solution you'd like
https://github.com/golang-module/carbon could be used to give all aspects the ability to convert datas and times.
SO then we can incorporate this. It's needed in GUI and when you translate time between a DB and a GUI and back again. DB always should store dates as UTC, but GUI should show in dates adjusted to their own time zone.
The text was updated successfully, but these errors were encountered: