From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: parsing time strings from properties Date: Sat, 21 Sep 2019 16:27:33 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e4d4550593160455" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37268) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBlyt-0002Mp-2p for emacs-orgmode@gnu.org; Sat, 21 Sep 2019 16:27:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBlyr-0006a6-UQ for emacs-orgmode@gnu.org; Sat, 21 Sep 2019 16:27:46 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:42075) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBlyr-0006ZX-Ow for emacs-orgmode@gnu.org; Sat, 21 Sep 2019 16:27:45 -0400 Received: by mail-pl1-x62d.google.com with SMTP id e5so4735933pls.9 for ; Sat, 21 Sep 2019 13:27:45 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode --000000000000e4d4550593160455 Content-Type: text/plain; charset="UTF-8" I use a very simple property in my assignment descriptions to set the assignment due date: :DUE_AT: 2019-09-26 I then pass this to an API which expects a date parameter like `2019-09-26T23:59:59-04:00`. Since I only work in one time zone, I can just concat the property value with the additional text, though actually I have to change the `-04:00` string twice a year. I'm wondering though how hard it would be to get the current time zone -- or the time zone that the course is taught in -- from emacs, and construct the string from that value. Basically, I want a simple date representation to be interpreted as "the last possible moment on this date i nthe appropriate time zone". I have not tried to use timestamps here, in part because I'm more comfortable dealing with text than with the horrors of time representations in either lisp or javascript. Alsoi, I find it very very fast to insert a text string, and just a little bit slower and more of an interruption to add a timestamp. I just wanted to ask how other people manage this kind of operation; maybe I should make the effort to start using DEADLINE timestamps. I don't really use them in my own time management so I'm not well-versed in how to manage them. In nay case, I as always appreciate all of your help. Matt --000000000000e4d4550593160455 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I use a very simple property in my assignment descrip= tions to set the assignment due date:

:DUE_AT: 201= 9-09-26

I then pass this to an API which expects a= date parameter like `2019-09-26T23:59:59-04:00`. Since I only work in one = time zone, I=C2=A0 can just concat the property value with the additional t= ext, though actually I have to change the `-04:00` string twice a year.=C2= =A0 I'm wondering though how hard it would be to get the current time z= one -- or the time zone that the course is taught in -- from emacs, and con= struct the string from that value.=C2=A0

Basi= cally, I want a simple date representation to be interpreted as "the l= ast possible moment on this date i nthe appropriate time zone". I have= not tried to use timestamps here, in part because I'm more comfortable= dealing with text than with the horrors of time representations in either = lisp or javascript. Alsoi, I find it very very fast to insert a=C2=A0 text = string, and just a little bit slower and more of an interruption to add a t= imestamp.=C2=A0 I just wanted to ask how other people manage this kind of o= peration; maybe I should make the effort to start using DEADLINE timestamps= . I don't really use them in my own time management so I'm not well= -versed in how to manage them.

In nay case, I as a= lways appreciate all of your help.=C2=A0

Matt=
--000000000000e4d4550593160455--