# Is there a convenience function in DRMS for converting from UTC to TAI?

**URL:** <https://community.openastronomy.org/t/is-there-a-convenience-function-in-drms-for-converting-from-utc-to-tai/1333>\
**Category:** SunPy\
**Tags:** sunpy, question\
**Created:** [December 21, 2025, 2:29am UTC](https://community.openastronomy.org/t/is-there-a-convenience-function-in-drms-for-converting-from-utc-to-tai/1333 "2025-12-21T02:29:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wsetterb](https://avatars.discourse-cdn.com/v4/letter/w/f19dbf/32.png) [@wsetterb](https://community.openastronomy.org/u/wsetterb)\
**Post date:** [December 21, 2025, 2:29am UTC](https://community.openastronomy.org/t/is-there-a-convenience-function-in-drms-for-converting-from-utc-to-tai/1333/1 "2025-12-21T02:29:10Z")

</div>

Say you have a time `2022-01-01T00:01:02` and we want to put it into the DRMS time string request style.

Here’s a function that does that:  
`def time_to_aia_tai(t: atime.Time) → str:`  
` ‘’‘Generate a DRMS AIA string from an astropy time’‘’`  
` parse_str = “{year}-{month}-{day}T{hh}:{mm}:{ss}”`  
` parsed_aia = parse.parse(parse_str, str(t.tai)).named`  
` fmt_str = “{year}.{month}.{day}_{hh}:{mm}:{ss}_TAI”`  
` return fmt_str.format(**parsed_aia)`

Does something like this exist in DRMS already? Could be useful. Thanks

---

<div class="post-metadata">

**Author:** ![ayshih](https://dub1.discourse-cdn.com/flex005/user_avatar/community.openastronomy.org/ayshih/32/84_2.png) [@ayshih](https://community.openastronomy.org/u/ayshih)\
**Post date:** [December 21, 2025, 3:31am UTC](https://community.openastronomy.org/t/is-there-a-convenience-function-in-drms-for-converting-from-utc-to-tai/1333/2 "2025-12-21T03:31:54Z")

</div>

I know very little about DRMS (or `parse`, for that matter), but can you simply do:

```auto
t.tai.strftime("%Y.%m.%d_%H:%M:%S_TAI")

```
