{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
res = wait_file(chan,ints, "digits/today",lang);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
} else if ((beg_today - 86400) < time) {
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
res = wait_file(chan,ints, "digits/today",lang);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
} else if ((beg_today - 86400) < time) {
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
res = wait_file(chan,ints, "digits/today",lang);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
char todo = format[offset]; /* The letter to format*/
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
if (todo == 'Q') {
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
res = wait_file(chan,ints, "digits/today",lang);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
res = wait_file(chan,ints, "digits/today",lang);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
res = wait_file(chan,ints, "digits/today",lang);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
} else if ((beg_today - 86400) < time) {
* language to say the date, with changes in what you say, depending
* upon how recent the date is. XXX */
{
- struct timeval now;
+ struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
- gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ gettimeofday(&now,NULL);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
res = wait_file(chan,ints, "digits/today",lang);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
} else if ((beg_today - 86400) < time) {
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
res = wait_file(chan,ints, "digits/today",lang);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
} else if ((beg_today - 86400) < time) {
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
res = wait_file(chan,ints, "digits/today",lang);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
} else if ((beg_today - 86400) < time) {
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
res = wait_file(chan,ints, "digits/today",lang);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
} else if ((beg_today - 86400) < time) {
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
res = wait_file(chan,ints, "digits/today",lang);
{
struct timeval now;
struct tm tmnow;
- time_t beg_today;
+ time_t beg_today, tt;
gettimeofday(&now,NULL);
- ast_localtime(&now.tv_sec,&tmnow,timezone);
+ tt = now.tv_sec;
+ ast_localtime(&tt,&tmnow,timezone);
/* This might be slightly off, if we transcend a leap second, but never more off than 1 second */
/* In any case, it saves not having to do ast_mktime() */
- beg_today = now.tv_sec - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
+ beg_today = tt - (tmnow.tm_hour * 3600) - (tmnow.tm_min * 60) - (tmnow.tm_sec);
if (beg_today < time) {
/* Today */
} else if ((beg_today - 86400) < time) {