Convert time to a string according to NEXUS format Parameters ---------- t : time.struct_time Time in the format returned by ``time.localtime`` or ``time.gmtime`` Returns ------- t : str A string represetation of time according to NEXUS standard
(t)
| 308 | |
| 309 | |
| 310 | def convert_time_to_nexus_string(t): |
| 311 | """ |
| 312 | Convert time to a string according to NEXUS format |
| 313 | |
| 314 | Parameters |
| 315 | ---------- |
| 316 | |
| 317 | t : time.struct_time |
| 318 | Time in the format returned by ``time.localtime`` or ``time.gmtime`` |
| 319 | |
| 320 | Returns |
| 321 | ------- |
| 322 | |
| 323 | t : str |
| 324 | A string represetation of time according to NEXUS standard |
| 325 | """ |
| 326 | # Convert to sting format recommented for NEXUS files |
| 327 | t = ttime.strftime("%Y-%m-%dT%H:%M:%S+00:00", t) |
| 328 | return t |
| 329 | |
| 330 | |
| 331 | def convert_time_from_nexus_string(t): |
no outgoing calls
no test coverage detected