search for: strftime

Displaying 20 results from an estimated 741 matches for "strftime".

2010 Jul 13
3
STRFTIME function declared in globals context
I'm trying to declare a few date-related global variables to ease my dialplan. When I declare the following in the [globals] context of extensions.conf, I get unexpected results: YEAR = ${STRFTIME(${EPOCH},,%Y)} MONTH = ${STRFTIME(${EPOCH},,%m)} DAY = ${STRFTIME(${EPOCH},,%d)} TIMESTAMP = ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)} If I evaluate these variables in the dialplan later, using exten => 7777,n,Verbose(${TIMESTAMP} - ${YEAR} - ${MONTH} - ${DAY}) My output is as follows: -- Exe...
2008 Dec 09
3
Voicemail.conf: where to fin strftime manual entry ?
Hi, In voicemail.conf, you can read ; Look in /usr/share/zoneinfo/ for names of timezones. ; Look at the manual page for strftime for a quick tutorial on how the ; variable substitution is done on the values below. Where can this manual page for strftime be found ? man strftime and apt-cache search strftime don't reply much ... Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: htt...
2006 Jul 28
6
STRFTIME() why is it not defined
I am trying to take the input from a field in wich the user enters a date, and formatting it to my time format if params[:gotcha] != '''' gotc = params[:date].to_a gotc.strftime("%m/%d/%y") end Yet I get this error: NoMethodError in AddController#add undefined method `strftime? for ["00000"] What''s wrong. I''m positive this method is defined. What''s wrong with my code? It''s so odd... Thanks for your help and time....
2013 May 16
1
strftime
Hello, I'm a little surprised about the result of strftime for my data. > str(time) chr [1:315504] "2006-01-01 00:10:00" "2006-01-01 00:20:00" "2006-01-01 00:30:00" ... > str(strftime(time,format="%Y-%m-%d %H:%M:%S")) chr [1:315504] "2006-01-01 00:00:00" "2006-01-01 00:00:00" "2006-...
2012 Feb 03
3
strftime - Dates from Excel files
Hi I have many excel files were the Date field was not declared as date, so the dates look like this: 1/2/1978 I know that the format is day/month/year How can I make R change this to Date format? If I use strftime, I get wrong dates: dataset=c("1/2/1978") strftime(dataset,"%d/%m/%Y") "19/02/0001" Thanks in advance.
2008 Feb 04
1
strftime fails on POSIXct objects (PR#10695)
R 2.6.1 on a Thinkpad T60 running up-to-date Gentoo: Despite the documentation, which says: 'strftime' is an alias for 'format.POSIXlt', and 'format.POSIXct' first converts to class '"POSIXlt"' by calling 'as.POSIXlt'. Note that only that conversion depends on the time zone. strftime fails on POSIXct objects: > foo <- as.POSIXct(strpt...
2001 May 09
1
OpenSSH 2.9p1 on 4.3BSD based system
Dear developpers, I successfully compiled OpenSSH 2.9p1 which I get via CVS with a little modification. Patch is available at http://www.rc.tutrp.tut.ac.jp/~nakaji/install/NEWS/utils/ref/openssh_cvs-news4.diff.gz But one problem remains. In config.h.in, there is a definition about strftime function /* Define if you have the `strftime' function. */ #undef HAVE_STRFTIME but this HAVE_STRFTIME directive is not used. And my system, Sony NEWS-OS 4.2.1a+RD which is 4.3BSD based system, does not have strftime function so that I must add a library including strftime function to LIBS va...
2011 Mar 10
1
Timezone issue with strftime/strptime and %z and %Z
...-1 loaded via a namespace (and not attached): [1] rJava_0.8-8 tools_2.12.1 > > t1 <- strptime("1995-05-25T15:30:00+10:00", format = "%Y-%m-%dT%H:%M:%OS") > t2 <- strptime("1995-05-25T15:30:00+10:00", format = "%Y-%m-%dT%H:%M:%OS%z") > > strftime(t1, format = "%Y-%m-%dT%H:%M:%OS") [1] "1995-05-25T15:30:00" > strftime(t1, format = "%Y-%m-%dT%H:%M:%OS%z") [1] "1995-05-25T15:30:00Mitteleurop?ische Sommerzeit" > # Ends in "Mitteleurop?ische Sommerzeit", not in +10:00, so time zone is ignor...
2006 Feb 18
5
Date formatting error
...'m trying to do is format a date and I get an error. Details below. I have a partial to list all "notes" associated with a "client" with the following code. <% for note in @client.notes %> <hr /> <%=h note.note_text %> Posted on <%=h note.created_at.strftime("%I:%M") %> by <%=h note.created_by %> <% end %> Which gives me the error... |"You have a nil object when you didn''t expect it! The error occured while evaluating nil.strftime" When I remove the |.strftime("%I:%M") from note.created_at the...
2006 Apr 20
7
checking date
Radrails created a field for date <%= product.date_available.strftime("%y-%m-%d") %> What does this mean? Should the definition be date or datetime? I tried both and no results Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060420/ed0cbb14/attachment.html
2012 Jun 26
4
ActionView::Template::Error (undefined method `strftime' for nil:NilClass)
...er admin section of the website and now I can no longer view page 2 of the list of pdf''s. Nor can I login to see the newsletters as a student. I''m using Ruby 1.9.3, Rails 3.2.1. Here''s the information from the log file. ActionView::Template::Error (undefined method `strftime'' for nil:NilClass): 28: <%- locals = {:enewsletter => enewsletter} %> 29: <td nowrap="nowrap" class=''enewsletter_name''><%= enewsletter.subscription.title %></td> 30:...
2005 Mar 09
21
Converting time retrieved from MySQL
...seconds and microseconds since [...] January 1, 1970". All well and good. Unfortunately, RoR is converting my date to this: Tue Mar 08 17:00:34 MST 2005 which, as far as I can tell, is as string representation of the date; as such, I can''t perform any date operations on it (strftime, etc). My question has two parts: 1) Can some sort of date operation be brought to bear on RoR''s internal date format to make it compatible with standard Ruby date operations? 2) If not, is there some way to turn off RoR''s parsing of the date returned from the MySQL query? -...
2010 Oct 29
2
strftime vs strptime ??
Hello Could anyone explain me the difference between strftime vs strptime, please ? I've read the help but it's a little bit cionfusing for me. cheers -- View this message in context: http://r.789695.n4.nabble.com/strftime-vs-strptime-tp3018865p3018865.html Sent from the R help mailing list archive at Nabble.com.
2006 May 13
1
undefined method `strftime'', being called from a partial.
Hi, I''m having an issue with calling a function that I''ve defined in ApplicationHelper called format_time: module ApplicationHelper def format_time(time) time.strftime("%a %b %d, %I:%M%p") end end I use this function in my views to format the Time.now that I would have stored in my tables as a DATETIME. I''m able to use this function, without any issues from my views, but if I try using it from a partial, I guess the following error: undef...
2017 Dec 27
3
Answered time on channel
...he "top most" channel. Below is an untested example, but is > inspired by dialplan code I use in production. Maybe it will help. > > [outbound] ; this is called on the incoming (caller) channel > exten => _X.,1,Noop > same => n,Set(MASTER_CHANNEL(start_timestamp)=${STRFTIME(,,%s.%3q)}) > same => n,Set(CHANNEL(hangup_handler_push)=hangup_handler,s,1) > same => n,Set(MASTER_CHANNEL(callid_ingress)=${SIPCALLID}) > same => n, *** unrelated dialplan, AGIs, etc. *** > same => n,Dial(SIP/${EXTEN}@1.1.1.1,,U(answer_handler)b(pre_dial_ > handler^...
2008 Jan 18
1
Automatic call-out problem
...========================================= extensions.conf: [0100q] exten => _XXXX.,1,Wait(1) exten => _XXXX.,n,Set(__TRIES=1) exten => _XXXX.,n,Set(__FMT_DATE=%Y-%m-%d %H:%M:%S) exten => _XXXX.,n,Set(__SZAM=${par_telszam}) exten => _XXXX.,n,System(echo -e "${SZAM}\,felvette\,${STRFTIME(${EPOCH},,${FMT_DATE})}" >> /tmp/0100q_0.txt) exten => _XXXX.,n,Playback(0100q_0) exten => _XXXX.,n,System(echo -e "${SZAM}\,99\,${STRFTIME(${EPOCH},,${FMT_DATE})}" >> /tmp/0100q_1v.txt) exten => _XXXX.,n(valasztas),Set(TIMEOUT(response)=5) exten => _XXXX.,n,S...
2006 May 16
4
question about strftime when called from partial.
Hi, I''m calling a helper I''ve written - format_time() that is called from my views with a given time that was selected from my database and was returned to the view via an instance variable. When I call format_time from a partial, I see that I get some kind of String error and the partial won''t render. Basically, the object being passed in to format_time is already a
2011 Oct 13
1
[hivex][PATCH] Increase filetime printing resolution to sub-second
...m fractional part. */ + while (sub_seconds % 10 == 0 && sub_seconds > 0) { + sub_seconds /= 10; + } + + ret = calloc (TIMESTAMP_BUF_LEN, sizeof (char)); if (ret == NULL) { - perror ("malloc"); + perror ("calloc"); exit (EXIT_FAILURE); } - if (strftime (ret, TIMESTAMP_BUF_LEN, "%FT%TZ", tm) == 0) { + if (strftime (ret, TIMESTAMP_BUF_LEN, "%FT%T", tm) == 0) { perror ("strftime"); exit (EXIT_FAILURE); } + ftd = strlen (ret); + + if (snprintf (ret + ftd, TIMESTAMP_BUF_LEN - ftd, ".%" PRIi64 &qu...
2009 May 17
4
Can YOU find a trailing parenthesis?
On 1.6.1, I must be losing my eyesight: [internal] include => outbound-pstn ............. include => meetme ; 2663 include => setup-meetme-conf-room ; 6000xxxYYYY [setup-meetme-conf-room] exten => _6000XXXNXXX,n,Set(Time-in-secs="${STRFTIME(${EPOCH},,%s}" ) ........ CLI: -- Starting simple switch on 'DAHDI/1-1' [2009-05-17 14:54:49] WARNING[13433]: pbx.c:2846 func_args: Can't find trailing parenthesis? -- Executing [60001234567 at internal:1] Set("DAHDI/1-1", "Time-in-secs= "1242586489...
2010 Sep 03
0
How to use MYSQL(Set timeout x)
I use Asterisk 1.6.2.11 and this is my dialplan: [test] exten => 9999,1,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)}) exten => 9999,n,Answer() exten => 9999,n,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)}) exten => 9999,n,PlayBack(hello-world) exten => 9999,n,NoOp(${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)}) exten => 9999,n,MYSQL(Set timeout 2) exten =>...