Jump to content

Date Format


ttl

Recommended Posts

When a custom field's data type is set to Date/Time, what format is it expecting?

2022-04-13 08:04:26
2022-04-13 8:04AM

Or something else?  Didn't find anything mentioned in the knowledgebase.

Link to comment
Share on other sites

  • Moderators

I have a feature request to make this more obvious, but it does describe the required format in the Custom Field info:

image.png.1e28f08bf1a63e1d903115e448861fdf.png

If you look at a client's log, you will see multiple entries for custom_field_script.  Every Custom Field uses the same script file, it is just overwritten each time and then eventually no file is left behind afterwards.

Link to comment
Share on other sites

  • Moderators

I should probably mention that the Custom Fields are stored locally, but in a non-readable file format.  The client extracts them into the above mentioned script file, runs the script, then removes the script file for each Custom Field.

Link to comment
Share on other sites

Wow it was literally right in front of my face! 😬

I have a python script that when I run it manually on the machine it works, but when it's sent as a custom field script I get failure on about 90% of the machines and I can't figure out why.

One would think it'd fail for all or none.  No common denominator between the successes and failures (both success & failures are Sonoma, for example)

I'd originally erred it being the date format but that is most definitely not the cause.

What would be the best approach to troubleshooting such a thing?  The client log seems to only have an error code.

Edited by ttl
Link to comment
Share on other sites

  • Moderators

Apple no longer instal Python by default on devices.  Have you pushed out Python to these devices?  If you have pushed out Python, what version are the clients running and does this match the version you are running and therefore compatible with the script you have written?

Link to comment
Share on other sites

That ended up being the problem!

My test Mac is also the same Mac I do app signing on, so it had Xcode (and dev tools w/ Python) and all of the machines that worked had brew or Xcode on them, too.

Every machine that's custom field script was failing didn't have either.

 

Deploying Python did the trick and the Python scripts are fully functional, now!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...