[Flow] Validation > Exception instead of going back to newAction
Stephan Schuler
Stephan.Schuler at netlogix.de
Mon Dec 9 11:40:11 CET 2013
Hi Alexander.
So, you basically agree with what I suggested?
Because you suggest about 95% the same. Besides the tiny fact that I would simply override the default DateTimeType and make everything myself, because I expect native language date formats to explicitly not follow a single format. Some countries use "m/d/y" [1], others use "d.m.y" [1] (with flipped d and m). When it comes to times, I was told that there are some that use "a h:i" [1] , others use "h:i a" [1], and others don't even have such a thing, they only go "H:i" [1].
So I guess there cannot be a common format for them.
But besides that, I'm glad there is somebody who would solve the problem just the way I would do.
[1] To simplify my explanation, I'm referring to those format options being available by phps "date" function.
Regards,
Stephan Schuler
Web-Entwickler
Telefon: +49 (911) 539909 - 0
E-Mail: Stephan.Schuler at netlogix.de
Website: media.netlogix.de
--
netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Neuwieder Straße 10 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: info at netlogix.de | Internet: http://www.netlogix.de
netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt
-----Ursprüngliche Nachricht-----
Von: flow-bounces at lists.typo3.org [mailto:flow-bounces at lists.typo3.org] Im Auftrag von Alexander Berl
Gesendet: Montag, 9. Dezember 2013 11:12
An: flow at lists.typo3.org
Betreff: Re: [Flow] Validation > Exception instead of going back to newAction
Hi Axel,
maybe you can go a little different way about the core problem with the NLS:
create your own Doctrine Type that formats the DateTime correctly, similar to how timezone is handled here:
http://docs.doctrine-project.org/en/2.0.x/cookbook/working-with-datetime.html
or try to override the doctrine oracle platform getDateFormatString method (not sure if you could just implement your own platform)
https://github.com/doctrine/dbal/blob/5514917bde7fdb0dafc4bff61322bb39d7b7ad9f/lib/Doctrine/DBAL/Platforms/OraclePlatform.php#L666
Then use Flow DateTime objects and set date and time as Bastian suggested.
Regards,
Alexander
Am 06.12.2013 17:20, schrieb Axel Wüstemann:
> Am 06.12.2013 16:35, schrieb Stephen Bungert:
>> Can't you just output the date with the correct format?
>>
>
> I have german dates in the datebase, or better oracle intarnally
> formatted datetimes, but due to the NLS setting, it will be received
> by the client (doctrine here) as german formated date time.
>
> So I would get the error:
>
> Could not convert database value "14.10.13 05:10" to Doctrine Type
> datetime. Expected format: Y-m-d H:i:s
>
> Thos things normally could be treated in the select statement (to_char
> or to_date) - but this is not the idea of doctrine.
_______________________________________________
Flow mailing list
Flow at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
More information about the Flow
mailing list