Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

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

Please Log in or Create an account to join the conversation.

Last edit: by SamBrown.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

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

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...

Please Log in or Create an account to join the conversation.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

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

What exactly do you mean with entire config? i have posted my system config in the first post.. ;)

Please Log in or Create an account to join the conversation.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

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

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?

Please Log in or Create an account to join the conversation.

Last edit: by SamBrown.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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 following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

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

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?

Please Log in or Create an account to join the conversation.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

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

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 following user(s) said Thank You: JoomGuy

Please Log in or Create an account to join the conversation.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.078 seconds
In the begining i would like to say that j-cook is absolutly fantastic tool! And the person who created it is a genius.
Czyżak (Forum)  

Get Started