Questions tagged [zend-date]
64 questions
2
votes
1 answer
Zend_Date not working it seems
I have been working with Zend_Date. Can anyone tell me if the behaviour below is normal? The returned months seem to be wrong. I have put the output in comments.
Thanks for any help!
$oDate = new…

Rupert
- 1,629
- 11
- 23
2
votes
3 answers
Saving a Zend date in the database with Doctrine 2.1
I want to save a datetime in the database which was created with the doctrine schema tool.
In my form I set a date and time and i want to save it as a datetime in the database.
So i tried this:
$e->setStartDateTime(new…

sanders
- 10,794
- 27
- 85
- 127
2
votes
2 answers
Zend_Date tooooooooo slow, real slow
This is my code:
$frontendOptions = array('lifeTime' => 10);
$backendOptions = array('cacheDir' => '../tmp/');
$cache = Zend_Cache::factory( 'Core',
'File',
$frontendOptions,
…

iVela
- 1,160
- 1
- 19
- 40
2
votes
3 answers
Zend_Date / Zend_Locale : Change date format for a specific locale?
Is it possible to instruct Zend_Locale that it should use a certain locale, except for a minor alteration to the date format? I don't want to use the Zend_Date::toString() with the specific formatting, because that would use this format on all…

kander
- 4,226
- 1
- 22
- 43
2
votes
1 answer
Get localized Month Name in Concat function from query MySQL
In the db table 'items' I have a column 'date' (type date). In my query I want to build a string from a couple of columns including this date column, but I want the date to be displayed as month name and localized in the string at the same time. So…

zef
- 649
- 1
- 7
- 22
2
votes
1 answer
how to get the number of weeks of current year using Zend_Date class
how can we get number of weeks of current year,
for example if it's 2009 there are 53 weeks and 2010 has 52

viMaL
- 638
- 1
- 7
- 20
2
votes
2 answers
Problem with Zend_Date and ISO_8601 format
Frankly, I'm flummoxed. Can anyone tell me why I would get a failure message with this code?
$date = Zend_Date::now();
$date = $date->getIso();
if(Zend_Date::isDate($date, Zend_Date::ISO_8601)) {
print('success');
} else {
…

Noah Goodrich
- 24,875
- 14
- 66
- 96
2
votes
1 answer
How to use Zend_Date to print a time in a specific timezone
In my app I use Zend_Date. I have set date_default_timezone_set('UTC') because internally and in the database I only want to have UTC times.
For users I want to display it in their local time. What is the easiest way to do this? Let's say, I have…

Peter Smit
- 27,696
- 33
- 111
- 170
1
vote
1 answer
Zend_Date adding the timezone to a subtraction result
I have this code:
sub($start);
?>
In short: I create two dates, with a…

mingos
- 23,778
- 12
- 70
- 107
1
vote
1 answer
Should dates and currencies always be passed around as objects?
Help me settle an argument with a coworker...
We’re using Zend Framework and PHP and much of the data we deal with includes dates and prices. I’ve been arguing that when the data is retrieved (either from the database or JSON) we should…

J Cobb
- 294
- 3
- 14
1
vote
1 answer
zend date and summertime
I have a issue with dates crossing from winter/summer time.. please see example
$pickUpDate = '2011-10-23';
$dropOffDate = '2011-10-31';
$pickUpTime = '09:00';
$dropOffTime = '09:00';
…

Xrender
- 1,425
- 4
- 20
- 25
1
vote
1 answer
zend-framework how to Localize Zend_Date
how to localize the Zend_Date
when i wrote
Zend_Debug::dump(Zend_Locale::getTranslationList('type', 'en_US'));
i got long array some of its elements
.
.
["hebrew"] => string(15) "Hebrew Calendar"
["indian"] => string(24) "Indian National…

ahmedsafan86
- 1,776
- 1
- 26
- 49
1
vote
2 answers
class Zend_Date not found
I googled a lot until now, but I couldn't find anything that works.
I need to save a proper datetime value in my mySQL database, so I tried as used in ZF1 this one:
$date = new Zend_Date();
echo $date->toString('YYYY-MM-dd HH:mm:ss');
I got the…

pia-sophie
- 505
- 4
- 21
1
vote
1 answer
Zend_Date::isDate won't enforce $format
I've having an issue where Zend_Date::isDate is returning true even when the value doesn't necessarily match the format given.
For example:
$time = "12:34:56"; // Time doesn't have AM/PM attached
if( Zend_Date::isDate($time, 'hh:mm:ss a') )
…

Ryan
- 17,511
- 23
- 63
- 88
1
vote
1 answer
Zend_Date and setting timezone on instation
I have a ZF app and am saving times as UTC in MySQL db. When I retrieve, them I'd like to tell Zend_Ddate that they are UTC rather than the timezone set in php.ini of 'America/Los Angeles'.
Currently, I'm instantiating like this:
$date=new…

timpone
- 19,235
- 36
- 121
- 211