Formatting of Date on Remote-Server


#1

Hi there,

let’s first introduce myself as a new member :wink: My Name is Mario. I’m
from Germany and producing the site www.panatura.de.

As I just released the site these days I found an error in different
date formatting on the remote MySQL-Server. Please have a look and
perhaps you might give me an advice:

Easy as is, the View: <%= @page.updated_at.strftime("%d.%m%.%Y") %>

On my local development site it looks like this :

formatted -> 30.10.2008
unformatted -> Thu Oct 30 23:50:52 +0100 2008

Through the remote MySQL on the website it looks like this :

formatted -> 30.10%2008
unformatted -> 2008-10-31 04:46:44 UTC

Guess, you see the question :wink: Where does that “%” result from???

Any answer will be appreciated :wink:
Greetings

Mario


#2

I’m pretty sure you’re syntax is wrong…

strftime("%d.%m%.%Y")

should be

strftime("%d.%m.%Y")

On Oct 31, 3:00 pm, Mario Peterscheck <rails-mailing-l…@andreas-


#3

sw0rdfish wrote:

Absolutely blaming! Too much code seen the last few weeks :slight_smile:

That’s it - Thanks a hundred times!!!

Mario


#4

no problem… I do it all the time… spent three days trouble
shooting something cuz I spelt group; gruop

My last computer died the day I found that stupid mistake :stuck_out_tongue:

On Oct 31, 3:22 pm, Mario Peterscheck <rails-mailing-l…@andreas-