 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
-// This function returns a string with the current date
-String getDate()
-{
-    String result;
-    Process time;
-    // date is a command line utility to get the date and the time
-    // in different formats depending on the additional parameter
-    time.begin("date");
-    time.addParameter("+%Y-%m-%d");  // parameters: D for the complete date mm/dd/yy, T for the time hh:mm:ss
-    time.run();  // run the command
-
-    // read the output of the command
-    while (time.available() > 0)
-    {
-        char c = time.read();
-        if (c != '\n')
-            result += c;
-    }
-
-    return result;
-}
-
 // This function returns a string with the time stamp
 String getTimeStamp()
 {

        //
        // Log measurement data to file
        //
        dataStr = getTimeStamp() + ","
                  + String(dataPackage.rf12_group) + ","
                  + String(dataPackage.rf12_nodeid) + ","
                  + String(dataPackage.Vcc) + ","
                  + String(dataPackage.T);

        // open file, one one can be open at a time
        fileName = "/mnt/sda1/datalogs/" + getDate() + "_RF12.dat";
        // convert fileName string to char array
        fileName.toCharArray(__fileName_data, sizeof(__fileName_data));
        File dataFile = FileSystem.open(__fileName_data, FILE_APPEND);

#include <Bridge.h>
#include <JeeLib.h>

// temperature node data structure. Timestamp created locally, at time of receival.
typedef struct
{
    String timeStamp;   // "+%Y-%m-%d %T": format "YYYY-MM-DD hh:mm:ss"
    byte rf12_group;    // RF12 group ID
    byte rf12_nodeid;   // RF12 node ID
    float Vcc;          // Supply voltage
