SQL time format

The forum for designers and developers.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
SilverEagle
Posts: 713
Joined: 30. Sep 08, 14:00
Location: Netherlands
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

SQL time format

Postby SilverEagle » 13. Mar 09, 08:31

Hi Team,

What timeformat are the timefields in the database (tracks.timeadded, tracks.lastplayed)? The sqlite Date() function and the script Date() object both return rubbish for me.

SilverEagle

User avatar
Service-Team
Posts: 2448
Joined: 7. Dec 04, 04:48
Location: Germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: SQL time format

Postby Service-Team » 13. Mar 09, 15:48


SilverEagle
Posts: 713
Joined: 30. Sep 08, 14:00
Location: Netherlands
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: SQL time format

Postby SilverEagle » 16. Mar 09, 15:04

Hi Team,

Another date format observation:

A "new Date(2009, 3, 16, 4, 58, 10)" does return a date object for "16 april 2009 04:58.10", so the monthnr is treated as 0-11 while the daynr is treated as 1-31.

This highly non-orthogonal behaviour might be a feature or a bug, but it is certainly not in the documentation at http://www.silverjuke.net/sdk/date-constructor.html ...

SilverEagle

User avatar
Service-Team
Posts: 2448
Joined: 7. Dec 04, 04:48
Location: Germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: SQL time format

Postby Service-Team » 17. Mar 09, 09:37

Hello SilverEagle,

it's a feature, not a bug ;-)

Silverjuke simply implements the ECMAScript guidelines here; Silverjuke's date object is compatible to the one used eg. in JavaScript engines.

However, thank you for your post, you are right: We've added a not to all functions handling with months.

Best regards,
Your Silverjuke-Team

User avatar
Frenchi
Posts: 352
Joined: 6. Apr 08, 17:26
Location: Grenoble / France
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: SQL time format

Postby Frenchi » 29. May 09, 10:11


SilverEagle
Posts: 713
Joined: 30. Sep 08, 14:00
Location: Netherlands
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: SQL time format

Postby SilverEagle » 29. May 09, 10:18


User avatar
Frenchi
Posts: 352
Joined: 6. Apr 08, 17:26
Location: Grenoble / France
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: SQL time format

Postby Frenchi » 29. May 09, 10:56



[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Developer Network”