Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Date fields wrong format

[SOLVED] Date fields wrong format 08 Nov 2012 13:04 #5122

  • SamBrown
  • SamBrown's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Thank you received: 1
  • Karma: 0
Hi

i have the problem, that all of my date fields store the date selected in the calendar as 1970-1-1.

I have tried several things as

- setting the fields in tables to "inherit" with or without "unix time" and set the date format in the views to "dd.mm.yy"
- setting the fields in tables to "dd.mm.yy" with or without "unix time" and set the date format in the views to "inherit"

It works only if i switch back to Cook 1.5 but there are some other things not working ;-)

Is this a known bug in 2.0?

My system:

Joomla Version 2.5.7
The issue is in sandbox, cannot download at this time
Cook VersionCook 2.0
JS: JQuery
Form Style: Condensed
Features: Reduced
DB Automation: Model
Timeout: 20secs

Thanxs

Sam
Last Edit: 10 Nov 2012 10:28 by SamBrown.
The administrator has disabled public write access.

Re: Date fields wrong format 08 Nov 2012 13:22 #5124

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
No, no bug to my knowledge...

Have you set format differently in your views or have they been set to inherit (default)?
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Date fields wrong format 08 Nov 2012 13:36 #5127

  • SamBrown
  • SamBrown's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Thank you received: 1
  • Karma: 0
When it works with Cook 1.5 i set the fields in tables to "dd.mm.yy" with "unix time" enabled and set the date format in the views to "inherit".

When i switch to Cook 2.0 it does no longer work...
The administrator has disabled public write access.

Re: Date fields wrong format 08 Nov 2012 18:26 #5141

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
I have these working fine in 2.0 although I don't store in unix timestamp as you do.

The only difference I believe is that I started from scratch with version 2. That said, could you please post your entire config?

Thanks,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Date fields wrong format 08 Nov 2012 20:12 #5145

  • SamBrown
  • SamBrown's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Thank you received: 1
  • Karma: 0
What exactly do you mean with entire config? i have posted my system config in the first post.. ;)
The administrator has disabled public write access.

Re: Date fields wrong format 08 Nov 2012 20:15 #5146

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Sorry @SamBrown...

I missed that when I posted!

Can you try to build a single table/layout with a date field to check whether or not it works for you in a project started in V2.0?

Thanks,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Date fields wrong format 08 Nov 2012 20:25 #5147

  • SamBrown
  • SamBrown's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Thank you received: 1
  • Karma: 0
yes, i give it a try...

Must the option "unix timestamp" be enabled when the downloaded component is running on a unix/linux-host? Is that the reason for this option or am i completely wrong?
Last Edit: 08 Nov 2012 20:25 by SamBrown.
The administrator has disabled public write access.

Re: Date fields wrong format 08 Nov 2012 20:36 #5148

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
No, it shouldn't make a difference.

UNIX Timestamp is just a way of storing a 'universal' time/date reference. What I mean is that, it represents the number of seconds since midnight on Jan 1st 1970 and is a 10 digit integer.

The most common issue with it as far as I'm aware arises from an incorrect timezone being set, not the server OS.

More info about unix timestamps: www.google.co.uk/url?sa=t&rct=j&q=&esrc=...0og6xkBidY8SWOWUICvg

Hope its helpful,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.
The following user(s) said Thank You: admin

Re: Date fields wrong format 08 Nov 2012 20:37 #5149

  • SamBrown
  • SamBrown's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Thank you received: 1
  • Karma: 0
The test was successfull... i had created a new table with new fields in 2.0 but within the existing component, which is started in 1.5 and then switched to 2.0.

is it better to re-build the whole component from the scratch in 2.0?
The administrator has disabled public write access.

Re: Date fields wrong format 08 Nov 2012 20:45 #5151

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Maybe...

I can't remember whether or not date/datetime functionalities changed drastically in 2 but your issue does suggest so...

Recommend that you begin by opening your problematic project then;
  1. Go to one of your problematic tables and remove all date/datetime fields from it.
  2. Confirm that they've been removed from all related layouts for that table (They should but if not, remove them from layouts also)
  3. Re-add the fields in the table
  4. Re-add the fields to your layout(s)
  5. Regenerate the files
  6. Click to rebuild the sandbox and check the layout.
If all is well, repeat for the rest of your tables with date fields...

If not, maybe rebuilding in V2.0 from scratch will be the only option.

Hope it helps,

G
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Date fields wrong format 10 Nov 2012 10:28 #5202

  • SamBrown
  • SamBrown's Avatar
  • Offline
  • Junior Member
  • Posts: 21
  • Thank you received: 1
  • Karma: 0
Started completely new project 2.0 and now it works...

removing and adding of the fields in existing version does not help...

Thanxs

Sam
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy

Re: Date fields wrong format 10 Nov 2012 12:05 #5206

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Thanks for clarifying your findings!

Best wishes,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.
Time to create page: 0.235 seconds

Get Started