question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DateField and DateTimeField

See original GitHub issue

It would be very useful if DateField and DateTimeField would have an option (includeOffset maybe, or something similar) to be backed up by a model with offset included (as per ISO 8601), e.g.: 2018-06-07T00:00:00+01.

Right now, backing model is always a Zulu-time string, which is not optimal for all situations (actually, for most situations if we’re dealing with dates only).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mstijakcommented, Jun 8, 2018

Implemented in cx@16.6.5!

0reactions
tymaratscommented, Jun 8, 2018

Sounds reasonable.

I can see how Culture is a convenient place to put this global encoding handling, even though semantically this doesn’t have much to do with the culture. I’m guessing it’s not that easy to make it a “global” function, like when you’re enabling optional features (like enableMsgBoxAlerts, for example)? In any case, with appropriate documentation, any solution is fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DateTimeField - Django Models - GeeksforGeeks
DateTimeField is a date and time field which stores date, represented in Python by a datetime.datetime instance. As the name suggests, ...
Read more >
Model field reference - Django documentation
A date and time, represented in Python by a datetime.datetime instance. Takes the same extra arguments as DateField . The default form widget...
Read more >
Django admin datefield-datetimefield confusion - Stack Overflow
in admin interface, default value for date is given as datetime (yyyy-mm-dd hh:mm:ss.ms) on each new record. it complaints that the value does ......
Read more >
DateField & DateTimeField - Django Models Unleashed
Now what we want to do is introduce the concept of the daytime field or the date field. 01:23. Both of these fields...
Read more >
django.db.models DateField Example Code - Full Stack Python
DateField is a Django ORM mapping from your Python code to an date-type column in your relational database. The Django project has documentation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found