You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [15]: str(maya.MayaDT(epoch))
Out[15]: 'Fri, 17 Nov 2017 23:59:38 GMT'
In [16]: str(maya.when(epoch))
Out[16]: 'Sat, 18 Nov 2017 00:59:38 GMT'
I guess it should either return the same value as the constructor does, instead of apparently the value shifted by an hour (which might be timezone-dependent), or simply refuse to process this type of input (which is what maya.parse() does):
In [17]: str(maya.parse(epoch))
[...]
ParserError: Invalid date string: 1510963178
The text was updated successfully, but these errors were encountered:
I still think that in that case it should refuse to process the non-human date, instead of silently processing it wrong by a subtle amount of time... also considering that almost by definition, when you're processing dates input by a human, you cannot know what exactly to expect, so if the human somehow decides to input an epoch instead of a standard human date, that should probably result in an exception, not a silent failure.
In [14]: epoch=str(maya.now().epoch)
In [15]: str(maya.MayaDT(epoch))
Out[15]: 'Fri, 17 Nov 2017 23:59:38 GMT'
In [16]: str(maya.when(epoch))
Out[16]: 'Sat, 18 Nov 2017 00:59:38 GMT'
I guess it should either return the same value as the constructor does, instead of apparently the value shifted by an hour (which might be timezone-dependent), or simply refuse to process this type of input (which is what maya.parse() does):
In [17]: str(maya.parse(epoch))
[...]
ParserError: Invalid date string: 1510963178
The text was updated successfully, but these errors were encountered: